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.
- Find more about Google Cloud Messaging (GCM) at http://developer.android.com/google/gcm/index.html.
- For more about Apple’s push notifications, visit https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9.
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 ...
Get Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.