Android Question how to control screen timeout

Abdulaziz93

Member
Licensed User
Longtime User
hi.

i'm working on this project but i have this issue that i want the screen stays on while the program is open
how i can set this up

button < when i click this button the screen stays on while the program is open or 10mints
 

gz7tnn

Member
Licensed User
Longtime User
Thank you very much ! this was useful
I realise this is an old thread, but just an addition to it.
It is important to do the pw.ReleaseKeepAlive step when the app closes, otherwise the phone will remain in the 'KeepAlive' state until it is restarted. At least that is what I found.
Coupled this new found command with a CCTV example and needed to keep the camera active or it defeated the purpose of CCTV...
 
Upvote 0
Top