wake up device

Dirk A

Member
Licensed User
Longtime User
Hi ,
I'm receiving tcp commands in a service. When my phone goes to sleep , I'm still receiving the commands but I try to wake up my activity with
B4X:
 If IsPaused(Main) Then StartActivity(Main)
with no result.
How do I wake up the phone ?
 

Dirk A

Member
Licensed User
Longtime User
I just want to turn on the screen if the user has turned it off
to turn on the screen I use
B4X:
Dim p As PhoneWakeState
p.KeepAlive(True)
but nothing happens
 
Upvote 0

Dirk A

Member
Licensed User
Longtime User
I added p.ReleaseKeepAlive before p.KeepAlive(True) , now it works but it always shows the "lock screen" and I have to unlock manually . Can you unlock programmatically ?
 
Last edited:
Upvote 0
Top