top | item 9876755

Bootstrapping GCM with Amazon SQS for Server-Client Communication

14 points| pocha | 10 years ago |github.com

3 comments

order

j_s|10 years ago

Today I Googled: GCM - Google Cloud Messaging

It looks like this is a demo using GCM to only to resurrect a polling background service on an Android phone, since GCM-only can be too slow.

pranayairan|10 years ago

nice are you shutting down the service if queue is empty ?? If not that would drain out the battery, also shutting down service when internet is not available should be good.

pocha|10 years ago

This is a pretty bare-bone POC app. While shutting down service when no internet makes sense, I am currently not doing it. But rest of the time, the service keeps listening on the queue all the time, even if there is no data in the queue.

I am wondering how much battery drain it could cause. Whatsapp also has this MessageService that keeps running all the time in the background & it has not been a battery hogger I guess.