Set a time when you want your app to start automatically if it is not already opened.
Example - Set Alarm
function OnStart()
{
var now = Date.now();
app.SetAlarm( "Set", 1234, OnAlarm, Date.now() + 3000 );
}
function OnAlarm( id )
{
app.ShowPopup( "Got Alarm: id = " + id );
}
from native import app
import time as Date
def OnStart():
now = Date.now()
app.SetAlarm("Set", 1234, OnAlarm, Date.now() + 3000)
def OnAlarm(id):
app.ShowPopup("Got Alarm: id = " + str(id))