Table of Contents

PreventScreenLock

(Information and examples taken from the DroidScript documentation)

Description

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

Use this method for tilt based apps where the user is not touching the screen regularly to keep the device awake.

Also except false and true can have options app.PreventScreenLock( “Full” ), app.PreventScreenLock( “Partial” ).

 app.PreventScreenLock( prevent );

Example

function OnStart()
{
  app.PreventScreenLock( true );
}