T Troberg Well-Known Member Licensed User Longtime User Mar 26, 2015 #1 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.
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.
Erel B4X founder Staff member Licensed User Longtime User Mar 26, 2015 #2 Troberg said: Is it important that I use the same instance of PhoneWakeState when I set KeepAlive and when I set ReleaseKeepAlive Click to expand... No. It is not important. Upvote 0
Troberg said: Is it important that I use the same instance of PhoneWakeState when I set KeepAlive and when I set ReleaseKeepAlive Click to expand... No. It is not important.
T Troberg Well-Known Member Licensed User Longtime User Mar 26, 2015 #3 Thanks, one more long time span variable down! Upvote 0