Your opinion matters! Please fill in the InfoQ Readers’ Survey!

Google Cloud Messaging for Android (GCM) Unveiled, to Replace C2DM Framework

| by Daniel Rubio Follow 0 Followers on Aug 13, 2012. Estimated reading time: 2 minutes |

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.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Porting from C2DM to GCM was pretty straight forward and easy by sreenath venkataramanappa

It took me 2 hours to port old code using C2DM to GCM. GCM library avoids more boilerplate code as compared to C2DM.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss