Back

CreateNotification

Notification creates a Notification object to display messages in the notification drawer.

app.CreateNotification( options ) -> app object - Notification

Example -




function OnStart()
{
    app.ShowPopup("Sending notification");
    notify = app.CreateNotification();
    notify.SetMessage("Ticker","Title","Text");
    notify.Notify("testID");
    setTimeout(cancel,5000);
}

function cancel()
{
    notify.Cancel("testID");
    app.ShowPopup("Notification cancelled");
}
    Copy     Copy All       Run      

The following methods are avaiable on the Notification object:

  Cancel( id )
  Destroy()
  GetType() -> string - "Notification"
  Notify( id )
  Release()
  id -> string - "#id"

unknown
number - integer
cancel Cancel with notification id match
destroys object
Notify user
?
string - path to file or folder ( "/absolute/..." or "relative/..." )
use large image on notification area
string -
  hexadecimal: "#rrggbb", "#aarrggbb"
  colourName: "red", "green", ...
number - milliseconds
activate device notification LEDs
string
set notification text
object id