This object is in archive! 
GPS auto-off now working when screen is off
Solved
GPS auto-off feature works well, when "Keep auto-off enabled" is enabled and screen is on. When screen is off, the recorded track is smooth without any marks for GPS off. I tested it with "Min accuracy" sets to 1m to force GPS off even if there is a good signal. When "Keep auto-off enabled" is disabled, the GPS auto-off does not works at all.
Note, when GPS auto-off works (screen is on, "Keep auto-off enabled" is enabled), there is no beep/sound from "Position lost" notification, when the GPS is automatically turned off. I expected it notify me when the GPS is off.
Hi Martin,
are you a beta tester? We've just rebuilt getting location in Locus and it's available for testing in Locus Beta version available at Google PLa (http://docs.locusmap.eu/doku.php?id=manual:about:free_beta_testing). Perhaps the rebuild solves also your issue. Could you please test it?
Michal
Hi Martin,
are you a beta tester? We've just rebuilt getting location in Locus and it's available for testing in Locus Beta version available at Google PLa (http://docs.locusmap.eu/doku.php?id=manual:about:free_beta_testing). Perhaps the rebuild solves also your issue. Could you please test it?
Michal
I tested the beta version 3.30.2.8. Now its better, but still not OK. When the screen is on, it works as expected. When the screen is off, it looks like the "GPS update interval" and "Max search time" is always 300 seconds, regardless of the real settings.
I tested the beta version 3.30.2.8. Now its better, but still not OK. When the screen is on, it works as expected. When the screen is off, it looks like the "GPS update interval" and "Max search time" is always 300 seconds, regardless of the real settings.
Good day Martin,
may you please give it one more try with today published Beta version? I'm testing it now and can't simulate same problem you describe. Thanks!
Good day Martin,
may you please give it one more try with today published Beta version? I'm testing it now and can't simulate same problem you describe. Thanks!
I tested the version updated today - 3.30.3 RC. I can still reproduce it. I tested it with the following settings:
In the attachment, there is a recorded a run (record settings: 1m OR 5sec). The important events from the record:
Note, after I turned the screen on, the GPS auto-off not working.
I tested the version updated today - 3.30.3 RC. I can still reproduce it. I tested it with the following settings:
In the attachment, there is a recorded a run (record settings: 1m OR 5sec). The important events from the record:
Note, after I turned the screen on, the GPS auto-off not working.
Thanks for a testing Martin!
I finally found a source of troubles. I do not know what Android version you have, but optimizations made by Google in latest version case, that method I use to wake up device after the defined time, has new limits. Based on the state of the device, this is degraded to use only once per minute/three/five and even 15 in special "doze mode". In you case, it only works once per three minutes.
I've made small improvement and added one more method that may wake up device after the defined time, but can't guarantee it will work as expected. We will see in next version ;).
Thanks for now.
Thanks for a testing Martin!
I finally found a source of troubles. I do not know what Android version you have, but optimizations made by Google in latest version case, that method I use to wake up device after the defined time, has new limits. Based on the state of the device, this is degraded to use only once per minute/three/five and even 15 in special "doze mode". In you case, it only works once per three minutes.
I've made small improvement and added one more method that may wake up device after the defined time, but can't guarantee it will work as expected. We will see in next version ;).
Thanks for now.
Hello,
I tested v3.30.3.1 beta on Samsung Galaxy A3 2017 (SM-A320FL, Android 7.0). Now it's looks like the "Max search time" (GPS is ON) works, but the "GPS update interval" (GPS is OFF) is still 300 seconds.
Thank you.
Hello,
I tested v3.30.3.1 beta on Samsung Galaxy A3 2017 (SM-A320FL, Android 7.0). Now it's looks like the "Max search time" (GPS is ON) works, but the "GPS update interval" (GPS is OFF) is still 300 seconds.
Thank you.
Thanks Martin for a tests. So seems that my "hack" does not work.
I'm sorry, but then I have currently no solution. All other methods need to keep the system awake and then GPS auto-off feature will be completely use-less. Seems we will have to add warning, that on some new devices, "update interval" may increase up to 15 minutes I found earlier.
Ah, maybe also check if you have disabled optimizations for Locus Map as we write here: http://docs.locusmap.eu/doku.php?id=manual:faq:gps_lost_fix_android6
Thanks for understanding,
Menion
Thanks Martin for a tests. So seems that my "hack" does not work.
I'm sorry, but then I have currently no solution. All other methods need to keep the system awake and then GPS auto-off feature will be completely use-less. Seems we will have to add warning, that on some new devices, "update interval" may increase up to 15 minutes I found earlier.
Ah, maybe also check if you have disabled optimizations for Locus Map as we write here: http://docs.locusmap.eu/doku.php?id=manual:faq:gps_lost_fix_android6
Thanks for understanding,
Menion
I have disabled all optimizations. I'm also going to test the Memory Locker mentioned in the FAQ.
Because I would like to use the GPS auto-off feature not to save the battery but to fix GPS accuracy (see Zpresneni GPS pravidelnym vypinanim/zapinanim GPS), what about workaround / new feature - if the "GPS update interval" is small, e.g. less then 10s (or even zero), do not put the device to sleep between GPS OFF and GPS ON.
I have disabled all optimizations. I'm also going to test the Memory Locker mentioned in the FAQ.
Because I would like to use the GPS auto-off feature not to save the battery but to fix GPS accuracy (see Zpresneni GPS pravidelnym vypinanim/zapinanim GPS), what about workaround / new feature - if the "GPS update interval" is small, e.g. less then 10s (or even zero), do not put the device to sleep between GPS OFF and GPS ON.
Hmm.
"do not put the device to sleep" ... and this is interesting. Locus do not put device to sleep. Locus just disconnect from GPS system. If device is put into sleep, it Locus can't influence. How it works when you set "update interval" to 10 seconds? Same problem, also Locus wake up device after 300s, not sooner?
Hmm.
"do not put the device to sleep" ... and this is interesting. Locus do not put device to sleep. Locus just disconnect from GPS system. If device is put into sleep, it Locus can't influence. How it works when you set "update interval" to 10 seconds? Same problem, also Locus wake up device after 300s, not sooner?
I will test the 10 seconds update interval, but I thing that the GPS will be OFF for 300 second. I reported this bug as the GPS auto-off does not works at all. Actually I tested it with GPS ON 60s / GPS OFF 10s and I never wait at least 300s so its looks like GPS auto-off does not works at all. Later, I tested it with intervals 45s - 120s and wait for mote time and the recorded GPS ON/OFF was always 300s.
"do not put the device to sleep" ... I imagine there is a code like "while GPS_accuracy()<MinAccuracy; do GPS(OFF); sleep(UpdateInterval); GPS(ON); sleep(MaxSerchTime); endwhile" and the problem is that the sleep() will actually sleep for 300s regardles of the arguement. My idea to fix it is to skip the sleep(UpdateInterval) if the UpdateInterval is zero (and allow it to be zero). It will not save the battery, but restart the GPS and fix GPS accuracy problem. But I never programmed for Android, so the real code may be completely different and the fix not works...
I will test the 10 seconds update interval, but I thing that the GPS will be OFF for 300 second. I reported this bug as the GPS auto-off does not works at all. Actually I tested it with GPS ON 60s / GPS OFF 10s and I never wait at least 300s so its looks like GPS auto-off does not works at all. Later, I tested it with intervals 45s - 120s and wait for mote time and the recorded GPS ON/OFF was always 300s.
"do not put the device to sleep" ... I imagine there is a code like "while GPS_accuracy()<MinAccuracy; do GPS(OFF); sleep(UpdateInterval); GPS(ON); sleep(MaxSerchTime); endwhile" and the problem is that the sleep() will actually sleep for 300s regardles of the arguement. My idea to fix it is to skip the sleep(UpdateInterval) if the UpdateInterval is zero (and allow it to be zero). It will not save the battery, but restart the GPS and fix GPS accuracy problem. But I never programmed for Android, so the real code may be completely different and the fix not works...
Understand. I may be in the end easier to write some function "restart GPS every X sec" as you wanted in original idea 2 weeks ago. I just don't like such weird tools usable for one person from million, sorry.
Please try with latest version 10 sec interval a little bit and let me know. As I wrote, I made there some changes and I believe, it may help here. Thanks for understanding.
Understand. I may be in the end easier to write some function "restart GPS every X sec" as you wanted in original idea 2 weeks ago. I just don't like such weird tools usable for one person from million, sorry.
Please try with latest version 10 sec interval a little bit and let me know. As I wrote, I made there some changes and I believe, it may help here. Thanks for understanding.
Personally, my GPS restart with Auto-OFF works in the last BETA without any problems. Settings 10,1,180, ON. I attach the SCR to see how the GPS turns off after three minutes. (Bright places in the record). I ran part of the route with the screen illuminated, part turned off, and in both cases Auto-Off worked.
Personally, my GPS restart with Auto-OFF works in the last BETA without any problems. Settings 10,1,180, ON. I attach the SCR to see how the GPS turns off after three minutes. (Bright places in the record). I ran part of the route with the screen illuminated, part turned off, and in both cases Auto-Off worked.
Thanks, Josef, I believe this works correctly for most of the devices. Just some of them and little more aggressive and put device to sleep mode immediately when there is a chance.
Martin, try it with 10 secs please with the latest version as I wrote. After that we may talk about it.
I can imagine some special settings for this. Little crazy :) but doable ...
Thanks, Josef, I believe this works correctly for most of the devices. Just some of them and little more aggressive and put device to sleep mode immediately when there is a chance.
Martin, try it with 10 secs please with the latest version as I wrote. After that we may talk about it.
I can imagine some special settings for this. Little crazy :) but doable ...
I think we have the same Galaxy A3 with Android 7 with Martin. That's why I wrote. A shorter reset than three minutes does not make sense to me. There will always be less accuracy after the reset. While walking, it's often seen in the detail of the record with a small loop.
I think we have the same Galaxy A3 with Android 7 with Martin. That's why I wrote. A shorter reset than three minutes does not make sense to me. There will always be less accuracy after the reset. While walking, it's often seen in the detail of the record with a small loop.
I tested it with GPS auto-off setting 10,1,180,ON - and it works! Actually from my 20 minute run, GPS OFF interval was 11 or 12 seconds, just once it was 40 seconds (maybe low GPS signal to fix the position?), great.
Thank you!
Do you need to test another ON/OFF intervals?
I tested it with GPS auto-off setting 10,1,180,ON - and it works! Actually from my 20 minute run, GPS OFF interval was 11 or 12 seconds, just once it was 40 seconds (maybe low GPS signal to fix the position?), great.
Thank you!
Do you need to test another ON/OFF intervals?
Perfect. In this case, it is probably because of change I made in the latest version. 12 seconds confirm it (defined 10 seconds interval + 2 seconds delay).
No need to test other intervals. Your and also Josef test confirm that GPS auto-off function now works correctly (if the system does not have some crazy optimizations enabled), which is important for me.
Hope it will work for you as expected. Thanks for tests.
Perfect. In this case, it is probably because of change I made in the latest version. 12 seconds confirm it (defined 10 seconds interval + 2 seconds delay).
No need to test other intervals. Your and also Josef test confirm that GPS auto-off function now works correctly (if the system does not have some crazy optimizations enabled), which is important for me.
Hope it will work for you as expected. Thanks for tests.
Replies have been locked on this page!