Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is a live internet connection required for push notification?

This maybe a silly question, but I need confirmation and I have no one else to ask.

I am trying to understand the implications of implementing my own push notification for android mobile devices. This requires a continuous TCP connection to a server, though most of the time it will be idle.

My assumption is that, even when idle, for the server to be able to push data to the client through the TCP connection, an active internet connection will always be required, and if the connection is disrupted (i.e. the user switches the connection off) this push will no longer be possible.

Is this assumption correct ?

like image 453
Heshan Perera Avatar asked Apr 16 '12 05:04

Heshan Perera


2 Answers

I'd say yes, it's correct indeed. How would you communicate without a live internet connection?

Afaik, Android C2DM handles this by queueing up the push requests when the user does not have a live net connection and sending them down to the user when the connection gets back up. You could implement a similar behavior in your solution's server side.

like image 100
Zsombor Erdődy-Nagy Avatar answered Sep 28 '22 14:09

Zsombor Erdődy-Nagy


Answer is YES

To understand the best way then any-other about C2DM, You just should go through this Google Project C2DM

They have provided complete documentation required to Understand the work and mechanism of C2DM and provided completed Examples too.

I have one another favourite tutorial for the same is : Vogella's

You just need to give a good time to read this thing and implement..

Happy Coding :)

like image 45
MKJParekh Avatar answered Sep 28 '22 14:09

MKJParekh