S shasunder Member Licensed User Longtime User Oct 10, 2015 #1 I am already doing this. Sub Globals Dim pw As PhoneWakeState End Sub Sub Activity_Resume pw.KeepAlive(False) 'lm.Initialize("Location") End Sub Sub Activity_Pause (UserClosed As Boolean) pw.KeepAlive(False) End Sub When I put the phone to sleep mode i see the message in the log as WakeLock already held.
I am already doing this. Sub Globals Dim pw As PhoneWakeState End Sub Sub Activity_Resume pw.KeepAlive(False) 'lm.Initialize("Location") End Sub Sub Activity_Pause (UserClosed As Boolean) pw.KeepAlive(False) End Sub When I put the phone to sleep mode i see the message in the log as WakeLock already held.
Erel B4X founder Staff member Licensed User Longtime User Oct 11, 2015 #2 1. You should move pw to Process_Globals. 2. You need to call pw.ReleaseKeepAlive to release the lock. Upvote 0
1. You should move pw to Process_Globals. 2. You need to call pw.ReleaseKeepAlive to release the lock.