Open Al4He6 opened 2 months ago
This seems better
function OnStart() { app.EnableBackKey( false ); app.ShowPopup( "Press the back key" ); }
function OnBack() { var yesNo = app.CreateYesNoDialog( "Exit App?" ); yesNo.Show(); yesNo.SetOnTouch( yesNo_OnTouch ); }
function yesNo_OnTouch( result ) { if( result == "Yes" ) app.Exit(); }
Example for Exit needs line yesNo.Show()