Back

GetNotifyId

Hello World

If the app was started by a notification, this function will return the id of that notification.

app.GetNotifyId() → string

See Also: CreateNotification

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 );
    }
}
    Copy     Copy All       Run