O'Reilly logo

The Android™ Developer’s Cookbook: Building Applications with the Android SDK, Second Edition by Nelson To, Ronan Schwarz, James Steele, Phil Dutson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

14. Push Messages

Push messaging is a communication method in which a connected client is informed of an event in a remote system by receiving notifications from that system. As opposed to pull messages, where the client needs to query the remote system at given time intervals, pushed messages are triggered by the remote system itself without having the client ask for a status update. Android supports message push through the Google Cloud Messaging (GCM) library. GCM is available on all Android devices running API Level 8 or higher, which should include most active devices. This chapter shows how to integrate with GCM and how to send and receive messages.

Google Cloud Messaging Setup

Google Cloud Messaging relies on the presence of both the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required