Back

Exit

Hello World

With Exit you can cancel and completely stop the app.

app.Exit( kill )

You can also forcefully kill the app by passing true as first argument.

Example - Exit dialog

function OnStart()
{
    app.EnableBackKey( false );
    app.ShowPopup( "Press the back key" );
}

function OnBack()
{
    var yesNo = app.CreateYesNoDialog( "Exit App?" );
    yesNo.SetOnTouch( yesNo_OnTouch );
}

function yesNo_OnTouch( result )
{
    if( result == "Yes" ) app.Exit();
}
Copy All       Run      
boolean