What is Google Cloud Messaging

Google Cloud Messaging (GCM) is a service for both Android-powered device and Chrome instances to send and receive message data from servers. The GCM service handles all aspects of queuing of messages and delivery to the target Android application running on the target device and the signed-in Chrome users. GCM is completely free no matter how big your messaging needs are, and there are no quotas. [1][2]

cloudmessaging

Image courtesy – http://www.androidhive.info%5B3%5D

When your app is in the foreground, using standard web requests or sockets to get information is the right choice. This isn’t what push messaging is meant to replace. When your app is in the background though, don’t you dare poll for updates. This is exactly the type of bad behavior that push messaging makes obsolete.

Why does it matter so much? Simple. Polling is worse by all measures—it’s harder on your servers, less timely, and affects your users’ battery life. There’s almost no better way to get someone to uninstall your app than to have them see it at the top of their battery usage screen.[4]

References:
[1]https://developer.android.com/google/gcm/index.html
[2]https://developer.chrome.com/apps/cloudMessaging
[3]http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
[4]https://blog.pushbullet.com/2014/02/12/keeping-google-cloud-messaging-for-android-working-reliably-techincal-post/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s