S songyang Member Licensed User Aug 15, 2018 #1 hello ,every one: I have a device with no any keys(virtual or entity).The screen will shut off after 10s,then I have no way to wake it up again. is there any way to awake it by touching the screen? Thanks!
hello ,every one: I have a device with no any keys(virtual or entity).The screen will shut off after 10s,then I have no way to wake it up again. is there any way to awake it by touching the screen? Thanks!
R ronell Well-Known Member Licensed User Longtime User Aug 15, 2018 #2 dont know if its possible to wake up a device by touching screen while it is in sleep mode but you can prevent the device from sleeping using phone library Code: Copy Sub Process_Globals Dim pw As PhoneWakeState End Sub Sub Activity_Resume pw.KeepAlive(True) End Sub Sub Activity_Pause (UserClosed As Boolean) pw.ReleaseKeepAlive End Sub or wakeup the device if some event happens in your app https://www.b4x.com/android/forum/threads/turning-screen-on.14999/#post-85130 Upvote 0
dont know if its possible to wake up a device by touching screen while it is in sleep mode but you can prevent the device from sleeping using phone library Code: Copy Sub Process_Globals Dim pw As PhoneWakeState End Sub Sub Activity_Resume pw.KeepAlive(True) End Sub Sub Activity_Pause (UserClosed As Boolean) pw.ReleaseKeepAlive End Sub or wakeup the device if some event happens in your app https://www.b4x.com/android/forum/threads/turning-screen-on.14999/#post-85130
Erel B4X founder Staff member Licensed User Longtime User Aug 15, 2018 #3 Check PhoneWakeState from the Phone library. Upvote 0
S songyang Member Licensed User Aug 15, 2018 #4 thank you, I set a screensaver instead of shut off the screen Upvote 0