Google Cloud Messaging for Android (GCM) Unveiled, to Replace C2DM Framework
Google has unveiled its Google Cloud Messaging for Android (GCM) service, which improves upon the deprecated Cloud to Device Messaging framework (C2DM) it replaces with no quotas, no sign-up forms and a richer set of new APIs.
GCM offers the ability to introduce a broker in between an application server and Android devices, guaranteeing cloud-type scalable communication between the two parties. GCM defines the contract so both a server and Android applications register for the GCM service and Google GCM servers maintain communication between them. The GCM servers handle all aspects of queuing messages and delivery to the target applications running on Android devices.
GCM also offers another set of important features. For example, the Android devices do not poll to receive communication. Instead, GCM servers push data onto a registered device when it's sent by an application server. By avoiding polling, the mobile device conserves battery life. In addition, an Android application doesn't necessarily need to be running to receive a message from GCM, if the necessary provisions are made an application is woken up via an Internet broadcast when a message is pushed to the device.
The GCM service now forms part of Google's many other APIs (e.g. Maps, Cloud SQL) that are managed on a per project basis on Google's API console. And unlike other Google APIs, there are no quotas on the GCM service, so it's entirely free for any number of messages or devices using the service.
For users of the old C2DM framework, the service was officialy deprecated on June 26, 2012 , so at any point in time after this date the service can be shutdown without notice. And even though C2DM and GCM are not interoperable, migration between the two platforms is simple. A C2DM-to-GCM migration document is already available to let you take advantage of newer GCM features, as well as developer blog posts about how to replace C2DM with GCM and migrating from C2DM to GCM .
In addition the well developed technical documentation on GCM , many other GCM resources are also available online. Stack Overflow has a series of questions & answers about GCM's inner workings . And if you're looking for a high-level view of GCM, you can see a one hour talk on the GCM platform by Francesco Nerieri (Engineering Manager for GCM) at the Google I/O 2012 conference held in San Francisco.
Porting from C2DM to GCM was pretty straight forward and easy
Uwe Zdun, Rafael Capilla, Huy Tran, Olaf Zimmermann Mar 09, 2014
Olav Maassen, Liz Keogh & Chris Matts Mar 08, 2014