Google had a mobile application called Android Cloud to Device Messaging until it was deprecated in June, 2012. This mobile application has been replaced by GCM or Google Cloud Messaging for Android. The Android developer website defines GCM as a service that will help developers send data from their own servers to their Android apps on Android devices. This GCM service can help in sending up to 4 kb to such an Android application. More often than not, GCM and this message will be used to instruct an application to access some more information on a relevant subject from the server.
In taking over from C2DM or Cloud to Device Messaging, GCM is also taking over queuing and delivery for messages among other features. Google has already announced that C2DM is no longer accepting new users. New developers will therefore have to sign up for GCM or existing ones will have to migrate from C2DM to GCM. Signing up for GCM is rather easy. Google has done away with sign- up forms and a developer only has to get hold of an API key from the company instead. GCM also has no quotas and most importantly to the end user perhaps, does not drain the battery quickly.
The sign up for GCM is done easily enough with the developer accessing the API guide on the Android developer website of Google. With this messaging service, the developer can enjoy benefits such as multicast messages and send messages to multiple senders too. A developer can use GCM to send lightweight messages which are either collapsible or non-collapsible. The latter kind of messages can carry a payload of up to 4K in size and the former are normally, send-to-sync messages. This category of message – the send to sync- simply means that a notification is sent to the device about the availability of information.
To start up with the GCM, you will need to possess two pieces of information – one is an API key and the other is a sender ID. The API key or application programming interface is needed by the developer’s server in order to send the GCM push notifications. The Sender ID is needed by the clients in order to receive the GCM messages from the server. This Google Cloud Messaging is part of a massive portfolio of APIs that Google has like Cloud SQL. Perhaps the most important differentiator between this Google API and the others is that GCM is free and has no quotas.
The GCM service can be used by as many devices as needed and can be used for as many messages as needed too. This messaging service was introduced at the I/O conference and even though it is primarily aimed at developers, the end users or clients will also see significant performance improvements. Both these users of GCM can enjoy benefits such as syncing among multiple devices. Developers can also enjoy the benefit of pushing data to multiple devices at the same time. Also, the battery power is conserved in a big way because the function of polling has been eliminated.