Back

GoToSleep

Hello World

Forces the screen to turn off and puts the device to sleep.

app.GoToSleep()

(This has the same effect as pressing the power button)

See Also: WakeUp

Example - Sleep and Wake

function OnStart()
{
    app.GoToSleep();
    setTimeout("app.WakeUp()", 5000)
}
    Copy     Copy All       Run