Book Image

PhoneGap for Enterprise

By : Kerri Shotts
Book Image

PhoneGap for Enterprise

By: Kerri Shotts

Overview of this book

Table of Contents (16 chapters)
PhoneGap for Enterprise
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 7. Push Notifications

Apps that rely on dynamic content often need a way to alert the users of the app that existing content has changed or if new content is available. Although it is possible for an app to repeatedly poll a server for changes or to create a web socket so that changes can be sent in real time from the server, neither option works when the app is in the background. Furthermore, polling is bad for battery life. Push Notifications come to the rescue; these are OS-level services that can display notifications even when our app isn't running, and they can do so in a way that doesn't drain batteries as much as continuous polling. Most platforms also provide some degree of fault tolerance: if the device isn't able to receive a Push Notification, the last notice is usually stored in the cloud until the device is in a situation where it can receive the notice.

In this chapter we'll cover the following topics:

  • Push Notification architecture

  • Boxcar Universal Push Notifications...