Android Question Awaken the screen

songyang

Member
Licensed User
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!
 

ronell

Well-Known Member
Licensed User
Longtime User
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
B4X:
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
Top