As of April 10, 2018, Google has deprecated GCM. The GCM server and client APIs are deprecated and will be removed as soon as April 11, 2019. Migrate GCM apps to Firebase Cloud Messaging (FCM), which inherits the reliable and scalable GCM infrastructure, plus many new features. See the migration guide to learn more.

Code Samples

Google provides several samples to help you with GCM development.

GcmNetworkManager sample

For an example of how to use the GcmNetworkManager API to schedule reliable network tasks in your application, see the GcmNetworkManager quickstart sample.

Android demo app

The GCM Android demo app on GitHub demonstrates a range of Google Cloud Messaging features, including topic messaging, upstream messaging, and scheduling tasks with the Network Manager.

Send feedback about...

Cloud Messaging
Cloud Messaging