Back

PreventScreenLock

JS Py
Hello World

The PreventScreenLock method prevents the device screen from dimming and locking while your app is in the foreground.

app.PreventScreenLock( mode )

Example - Example

function OnStart()
{
    app.PreventScreenLock( true );
}
from native import app

def OnStart():
    app.PreventScreenLock( True )
    Copy     Copy All       Run      
Boolean
String: Full or Partial