Google provides several samples to help you with GCM development.
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.