Page tree
Skip to end of metadata
Go to start of metadata

Register and Unregister

You can register a device to a remote notifications, only after the "deviceready" event was called. In order to register the device, all you need is this line:

Icon

A guide for obtaining the Google Project Number can be found here: Android Getting Started

If you're not supporting an Android platform, just pass an empty string instead of "YOUR_GOOGLE_PROJECT_NUMBER" (the first parameter).

For unregistering the device, just call:

Get device id

 

Icon

If you use our Remote Server API to register devices or send notifications, this is the device id needed to identify the device

PushApps uses a unique device id, in order to identify the device. If you would like to use the same id, you can call this method:

Handle Incoming Notifications

PushApps will raise an HTML event, every time an incoming notification is received. In order to bind a function to this event, all you need is:

Tags

There will be a time when you will want to send a push notification to a group of users, with a common characteristics. In order to do that, the PushApps PhoneGap plugin gives you the ability to mark users with a specific tag. For example: one's age. You can add as many tags as you want per user. For each, you'll need to supply the tag's identifier and the tag's value.

A set of tags and conditions between them creates a Segment, to learn more about Segments please refer to our Segmentation guide

There are 4 types of tags:

  • Boolean ( by a String , "true" or "false")

  • String

  • Number

  • Date

Boolean

Number

String

Date

Remove Tags

You can always remove tags from user, by calling the removeTags function: