Forum Archive

How to prevent screen lock

tachijuan

Folks,

I have a script that I wrote to keep track of a pool game my buddies and I play. It uses the ui module to build a simple GUI with a list of players and keeps track of the score by touches on the names of the players. Sometimes a player's turn in this game can last a while and the screen locks. Is there any way to temporarily disable the phone's screen lock function?

Thanks...

Phuket2

@tachijuan. I am new, but I think you can use:
console.set_idle_timer_disabled(flag)
Disable or enable the idle timer (which puts the device to sleep after a certain period of inactivity).

brumm

link

tachijuan

excellent. Thanks everyone. Was looking for screen lock and not sleep. And was looking through the UI module and not the console module. This works perfectly.