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