O'Reilly logo

Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services by Aaron Saunders

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

Chapter 11

Push Notifications

INTEGRATING PUSH NOTIFICATIONS into your application will allow the sending and receiving of messages, called notifications, to and from your application. The messages are sent to the specific device, so it does not necessarily require your application to be in the foreground for the message to be received. The application can then take a specific, predefined action based on receiving the notification.

iOS and Android mobile operating systems both support this functionality, although their implementations differ. Your application, if iOS-based, will receive notifications from the Apple Push Notifications (APN) service. If your application is Android-based, it will receive push notifications through the Google Cloud Messaging (GCM) service.

The Appcelerator Cloud Services Push Notifications API provides a user session or a device token-based solution for notifications. In this application, you will be using the push functionality that requires the user to be logged in to receive notifications. You will integrate this into the login process to register for notifications and the logout process for unregistering the user.

Setting ...

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