If the app was started by a notification, this function will return the id of that notification.
Example - Example
function OnStart()
{
var id = app.GetNotifyId();
if( id ) app.Alert( id, "Notification ID" );
else
{
not = app.CreateNotification();
not.SetMessage(
"You have an urgent notification",
"Press me!", "Do as the title says."
);
not.Notify( 1234 );
setTimeout( app.Exit, 2000 );
}
}
from native import app
def OnStart():
id = app.GetNotifyId()
if id:
app.Alert(id, "Notification ID")
else:
not = app.CreateNotification()
not.SetMessage(
"You have an urgent notification",
"Press me!", "Do as the title says."
)
not.Notify(1234)
app.SetTimeout(app.Exit, 2000)