Example: Target Individual Devices
// do not forget to call Backendless.initApp in the app initialization logic
var channel = "TestChannel",
message = "Hello, world!",
publishOptions = new Backendless.PublishOptions({
headers: {
"android-ticker-text": "Your just got a push notification",
"android-content-title": "This is a notification title",
"android-content-text": "Push notifications are cool"
}
}),
deliveryOptions = new Backendless.DeliveryOptions({
pushSinglecast: ["dummyDeviceId_001", "dummyDeviceId_002"] // devices IDs
});
Backendless.Messaging.publish( channel, message, publishOptions, deliveryOptions )
.then( function( messageStatus ) {
})
.catch( function( error ) {
});