Push notifications

Push notifications (Android and iOS) #

Task #

This example will show how to send push notifications to your Android or iOS device.

Video tutorial #

push notifications video

Send push notification to a specific device #

pusher = require('applibs.pusher')

device_id = '08a7a67cc15d5325c0bbaffbd1106c0e5a914b8ea6e850f4210a4a2cd260c835'
message = 'Test Message'

status, errors = pusher.push_notification(device_id, message)
log(status, errors)

Send push notification to all Android devices #

pusher = require('applibs.pusher')

message = 'Test Message'

status, errors = pusher.send_android(message)
log(status, errors)

Send push notification to all iOS devices #

pusher = require('applibs.pusher')

message = 'Test Message'

status, errors = pusher.send_ios(message)
log(status, errors)

Further assistance can be found in this forum thread