Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Cloud to Device Messaging (C2DM) work?

can somebody explain to me how googles Push Service work? I know google has a persistent connection to its servers but how come that a persistent connection doesnt drain the battery for no good?

I understand polling on the otherside constantly wake up the system and boot up the radio. But how is this different from a constant connection to a googleserver? For my understanding you need a permanent active radio to hold that connection?

How can this be more efficient in battery usage than polling?

thanks

like image 451
Michele Avatar asked Feb 24 '23 02:02

Michele


1 Answers

If you want some flowcharts here you go. UPDATE since i saw your comment.

C2DM is not battery efficient by it self. It does the same thing you whould do if implemented your own. The key difference is that your device is already connected by default with C2DM with services like Gmail Android Market .. generally googleApps. So C2DM is providing you the opportunity to use that "ASYNC" notifier with build in intervals for your application too. For efficiency you should trust google to that. But having 1 polling service is better that adding another one too

like image 119
weakwire Avatar answered Mar 05 '23 07:03

weakwire