Google Cloud Messaging (GCM)

Google Cloud Messaging (GCM) is a free service that helps developers send data from servers to their Android applications. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4KB of payload data (so apps like instant messaging can consume the message directly).

GCM replaces beta version of C2DM (Android Cloud to Device Messaging). Please note that C2DM is now deprecated, and that we are no longer allowing new manual C2DM sign-ups. Developers who do not switch to GCM can continue to use C2DM with no quota increase.

Getting a Simple API Key

To use GCM, you need to obtain a long-lived token (simple API key). If you are an existing C2DM user, you can use your C2DM token instead. To get a simple API key, follow these steps:

  1. In the main Google API console, select API Access.
  2. Click Create New Server Key.

GCM statistics

Developers will be able to sign-up for GCM for both Play and non-Play apps. However, GCM stats will be available for only published Google Play apps. To be able to see GCM stats in your Google Play Developer Console, associate the GCM Simple API Key or C2DM token with your Android application. Here’s how:

  1. Select the application that you would like to add GCM to under All Applications.
  2. Go to the Services & APIs tab.

    Services and APIs
  3. Scroll down to the GCM section of the page.
  4. Click the Link a Sender ID button.

    Add Google Cloud Messaging
  5. Finally, in the dialogue box please enter the Link Sender ID, and then click Link.

    Add Link Sender ID

Note that you can also revoke your key or a token through Google APIs console. After the key or token is revoked, you can continue to see GCM stats on the Statistics page in your Google Play Developer Console until you remove the GCM sender ID.