Abdulaziz93 Member Licensed User Longtime User Aug 21, 2013 #1 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
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
rbsoft Active Member Licensed User Longtime User Aug 21, 2013 #2 You can use PhoneWakeState from the Phone library. http://www.b4x.com/android/help/phone.html#phonewakestate_keepalive Code: Dim pw As PhoneWakeState pw.KeepAlive(False) 'Display on, dimmed 'or pw.KeepAlive(True) 'Display on, bright 'To release pw.ReleaseKeepAlive Rolf Upvote 0
You can use PhoneWakeState from the Phone library. http://www.b4x.com/android/help/phone.html#phonewakestate_keepalive Code: Dim pw As PhoneWakeState pw.KeepAlive(False) 'Display on, dimmed 'or pw.KeepAlive(True) 'Display on, bright 'To release pw.ReleaseKeepAlive Rolf
Abdulaziz93 Member Licensed User Longtime User Aug 22, 2013 #3 Thank you very much ! this was useful Upvote 0
G gz7tnn Member Licensed User Longtime User Nov 18, 2014 #4 Abdulaziz93 said: Thank you very much ! this was useful Click to expand... 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
Abdulaziz93 said: Thank you very much ! this was useful Click to expand... 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...