Skip to main content

Local notification

addDelayNotification(notificationTag, delayMS, title, message, actionId, optionalParams)​

Set up a notification scheduled in the specified milliseconds

ArgumentDescription
notificationTagnotification unique indentifier
delayMSmilliseconds to wait before sending the notification
titlenotification title
messagenotification message
actionIdactionId call when user interact with the notification
optionalParamsJSON string passed to the notification action

addPeriodNotification(notificationTag, delayMS, repeatIntervalMS, endDelayMs, title, message, actionId, optionalParams) {​

Set up a periodic notification scheduled in the specified milliseconds

ArgumentDescription
notificationTagnotification unique indentifier
delayMSmilliseconds to wait before sending the notification
repeatIntervalMSevery how many milliseconds to repeat the notification
titlenotification title
messagenotification message
actionIdactionId call when user interact with the notification
optionalParamsJSON string passed to the notification action
var notificationTag = "test"
var delayMS = 10000
var repeatIntervalMS = 15*60*1000
var endDelayMs = 16*60*1000
var title = "titolo"
var message = "messaggio"
var actionId = "1439"
var optionalParams = JSON.stringify(\{test:132\})

addPeriodNotification(notificationTag, delayMS, repeatIntervalMS, endDelayMs, title, message, actionId, optionalParams)

removePeriodicNotification(notificationTag)​

Remove periodic notification

removeAllNotification​

Remove all notificaitons