Shay Well-Known Member Licensed User Longtime User Aug 28, 2011 #1 Hi I am using the following code and I noticed that my device is still consuming CPU and RAM what am I missing? Awake.ReleaseKeepAlive - I am using this so device will not sleep Awake.KeepAlive(False) StopService(ServiceModule) - stopping the service (even that on this page is not running) Activity.Finish
Hi I am using the following code and I noticed that my device is still consuming CPU and RAM what am I missing? Awake.ReleaseKeepAlive - I am using this so device will not sleep Awake.KeepAlive(False) StopService(ServiceModule) - stopping the service (even that on this page is not running) Activity.Finish
Erel B4X founder Staff member Licensed User Longtime User Aug 29, 2011 #2 Code: Copy Awake.KeepAlive(False) acquires a power lock with brightness set to false. Upvote 0
Shay Well-Known Member Licensed User Longtime User Aug 29, 2011 #3 so I need to remove this line? (I have in activity create:Awake.KeepAlive(true) ) few more questions: 1. Do you know if I am using GPS, and device is turning off the screen - is the GPS is still getting info? (I need it to be) this is why I used the 2 awake commands 2. How can I allow the machine go to the "screen saver" (turn off) and still get the GPS location? Thanks Upvote 0
so I need to remove this line? (I have in activity create:Awake.KeepAlive(true) ) few more questions: 1. Do you know if I am using GPS, and device is turning off the screen - is the GPS is still getting info? (I need it to be) this is why I used the 2 awake commands 2. How can I allow the machine go to the "screen saver" (turn off) and still get the GPS location? Thanks
Erel B4X founder Staff member Licensed User Longtime User Aug 29, 2011 #4 so I need to remove this line? Click to expand... Yes. You can PartialLock to allow the screen to turn off and keep the CPU running. However it is not possible to say whether the GPS will stay enabled or not. Upvote 0
so I need to remove this line? Click to expand... Yes. You can PartialLock to allow the screen to turn off and keep the CPU running. However it is not possible to say whether the GPS will stay enabled or not.
Shay Well-Known Member Licensed User Longtime User Aug 29, 2011 #5 1. I think I have the same issuse as described here - using galaxy S2, phone libary 1.41 http://www.b4x.com/forum/basic4andr...e-brightscreen-boolean-android.html#post59028 2. so in order the GPS to work the device must not go to sleep? or you don't know the answer (I guess I can write something that beeps while getting location and see if I can still hear the beeps after devide went to sleep) Upvote 0
1. I think I have the same issuse as described here - using galaxy S2, phone libary 1.41 http://www.b4x.com/forum/basic4andr...e-brightscreen-boolean-android.html#post59028 2. so in order the GPS to work the device must not go to sleep? or you don't know the answer (I guess I can write something that beeps while getting location and see if I can still hear the beeps after devide went to sleep)
Erel B4X founder Staff member Licensed User Longtime User Aug 29, 2011 #6 The issue in this post was related to a syntax error. It is not possible to say. It depends on your actual device. You can use logs to check if the GPS works or not. Upvote 0
The issue in this post was related to a syntax error. It is not possible to say. It depends on your actual device. You can use logs to check if the GPS works or not.
Shay Well-Known Member Licensed User Longtime User Aug 29, 2011 #7 removing the Awake.KeepAlive(False) did not help this is helping: ExitApplication ' Kill the app Upvote 0