Android Question PhoneWakeState

Troberg

Well-Known Member
Licensed User
Is it important that I use the same instance of PhoneWakeState when I set KeepAlive and when I set ReleaseKeepAlive.

In other words, do I have to declare a PhoneWakeState and keep it, or can I just do a

B4X:
dim pws as PhoneWakeState
pws.KeepAlive(True)
and then, somewhere later down the line, in another sub, do

B4X:
dim pws as PhoneWakeState
pws.ReleaseKeepAlive
It would be neater if I could reduce the number of variables I need to keep, and keep things more local.
 
Top