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

Receiving Pushes from Boxcar


Although it might seem counterintuitive to work on the code that listens to Push Notifications before we work on the code to send them, it's really not. Boxcar allows you to send any number of pushes from their dashboard, which means that we can initially focus on receiving pushes before we worry about how to send them.

In order to receive pushes, our app needs to register the device with Boxcar. When we register our device, we can specify what kind of Push Notifications we are interested in using tags. Tags enable us to target pushes to specific consumers without the need to know the specific device information (such as their UUID). Tags are akin to channels, if that helps.

Our demo app just registers for two specific tags, but when we put everything together in the next chapter, we'll actually listen using a tag based on the authenticated user's username. This will enable our backend to send a Push Notification to a username, and it will reach them on any of...