Checks if the device screen is currently on.
Example - Check Screen On
function OnStart()
{
app.ShowPopup( "You may now disable your screen." )
setTimeout( checkScreenOn, 5000 );
}
function checkScreenOn()
{
screenOn = app.IsScreenOn();
app.ShowPopup( screenOn, "Screen On:" );
}
from native import app
def OnStart():
app.ShowPopup("You may now disable your screen.")
app.SetScreenBrightness(-1)
app.SetScreenOrientation("portrait")
app.SetScreenOn()
app.SetOnScreenOff(checkScreenOn)
def checkScreenOn():
screenOn = app.IsScreenOn()
app.ShowPopup(screenOn, "Screen On:")