Module: BMSPush

Push SDK class for handling the Web device requests

Methods

initialize(appGUID, appRegion, clientSecret, websitePushIDSafari, deviceId, callback)

Initialize the BMS Push SDK

Parameters:
Name Type Description
appGUID string

The push service App Id value

appRegion string

The region of the push service you hosted. Eg: .ng.bluemix.net, .eu-gb.bluemix.net or .au-syd.bluemix.net

clientSecret string

The push service client secret value.

websitePushIDSafari string

Optional parameter for safari push notifications only. The value should match the website Push ID provided during the server side configuration.

deviceId string

Optional parameter for deviceId.

callback Object

A callback function

register(callback)

Registers the device on to the BMSPush Notification Server

Parameters:
Name Type Description
callback Object

A callback function

registerWithUserId(userId:, callback)

Registers the device on to the BMSPush Notification Server

Parameters:
Name Type Description
userId: string

the User ID value.

callback Object

A callback function

retrieveAvailableTags(callback)

Gets all the available Tags for the backend mobile application

Parameters:
Name Type Description
callback Object

A callback function

retrieveSubscriptions(callback)

Gets the Tags that are subscribed by the device

Parameters:
Name Type Description
callback Object

A callback function

subscribe(tags, callback)

Subscribes to a particular backend mobile application Tag(s)

Parameters:
Name Type Description
tags Array.<string>

The Tag array to subscribe to. Eg; ["tag1","tag2"]

callback Object

A callback function

unRegisterDevice(callback)

Unregisters the device from the BMSPush Notification Server

Parameters:
Name Type Description
callback Object

A callback function

unSubscribe(tags, callback)

Unsubscribes from an backend mobile application Tag(s)

Parameters:
Name Type Description
tags Array.<string>

The Tag name array to unsubscribe from. Eg: ["tag1","tag2"]

callback Object

A callback function