Find installations by application id/version
Name | Type | Description |
---|---|---|
deviceType |
String
|
The device type |
appId |
String
|
The application id |
[appVersion] |
String
|
The application version |
cb |
Function
|
The callback function |
Name | Type | Description |
---|---|---|
err |
Error or String
|
The error object |
installations |
Array.<Installation>
|
The selected installations |
Find installations by user id
Name | Type | Description |
---|---|---|
userId |
String
|
The user id |
deviceType |
String
|
The device type |
cb |
Function
|
The callback function |
cb |
Function
|
The callback function |
Name | Type | Description |
---|---|---|
err |
Error or String
|
The error object |
installations |
Array.<Installation>
|
The selected installations |
Find installations by subscriptions
Name | Type | Description |
---|---|---|
subscriptions |
String or Array.<String>
|
A list of subscriptions |
deviceType |
String
|
The device type |
cb |
Function
|
The callback function |
Name | Type | Description |
---|---|---|
err |
Error or String
|
The error object |
installations |
Array.<Installation>
|
The selected installations |
The device type such as ios
.
The device token as provided by GCM/APN/etc.
(iOS only) The notification's message.
(iOS only) The value indicated in the top right corner of the app icon. This can be set to a value or to -1 in order to increment the current value by 1.
(iOS only) The name of a sound file in the application bundle.
(Android only) An arbitrary string (such as "Updates Available") that is used to collapse a group of like messages when the device is offline, so that only the last message gets sent to the client.
(Android only) Indicates that the message should not be sent immediately if the device is idle. The server will wait for the device to become active, and then only the last message for each collapse_key value will be sent.
The date that the notification is created.
The date that the notifcation is modified.
The time that the notification should be sent. (not supported yet)
The time that the notification should be expired.
The expiration interval in seconds. The interval starts at the time when the notification is sent to the push notification provider.
The status of the notification. (not supported yet)
Name | Type | Description |
---|---|---|
settings |
Object
|
The push settings |
Name | Type | Description |
---|---|---|
result |
PushManager
|
Lookup or set up push notification service for the given appId
Name | Type | Description |
---|---|---|
appId |
String
|
The application id |
Name | Type | Description |
---|---|---|
result |
|
Configure push notification for a given device type. Return null when no provider is registered for the device type.
Name | Type | Description |
---|---|---|
deviceType |
String
|
The device type |
pushSettings |
Object
|
The push settings |
Name | Type | Description |
---|---|---|
result |
|
Push a notification to the given installation. This is a low-level function
used by the other higher-level APIs like notifyById
and notifyByQuery
.
Name | Type | Description |
---|---|---|
installation |
Installation
|
Installation instance - the recipient. |
notification |
Notification
|
The notification to send. |
cb |
function(Error|undefined)
|
Push a notification to the device with the given registration id.
Name | Type | Description |
---|---|---|
installationId |
Object
|
Registration id created by call to Installation.create(). |
notification |
Notification
|
The notification to send. |
cb |
function(Error|undefined)
|
Push a notification to all installations matching the given query.
Name | Type | Description |
---|---|---|
installationQuery |
Object
|
Installation query, e.g. |
notification |
Notification
|
The notification to send. |
cb |
function(Error|undefined)
|
Push notification to installations for given devices tokens, device type and app.
Name | Type | Description |
---|---|---|
application |
appId
|
id |
type |
deviceType
|
of device (android, ios ) |
device |
deviceTokens
|
tokens of recipients. |
notification |
Notification
|
The notification to send. |
cb |
function(Error|undefined)
|