This shows you the differences between two versions of the page.
built_in:prevent_screen_lock [2015/03/04 18:16] octazid created |
built_in:prevent_screen_lock [2018/02/19 01:38] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | =====PreventScreenLock===== | ||
- | // | ||
- | |||
- | ====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. | ||
- | |||
- | < | ||
- | |||
- | ---- | ||
- | |||
- | ====Example==== | ||
- | |||
- | <code javascript> | ||
- | |||
- | function OnStart() | ||
- | { | ||
- | app.PreventScreenLock( true ); | ||
- | } | ||
- | |||
- | </ |