This object is in archive! 

Live Tracking intervall while display is OFF

Hubert shared this problem 7 years ago
Solved

Hello,


I am using "userdefined Live tracking" in Locus Pro on a Samsung Galaxy S4 which is working very fine in the interval of 30 Seconds while the display is ON.

As soon as the display is switched OFF, the live tricking interval grows up to one Point every 5 Minutes.


Is there a pssibility that the interval is keept by 30 Seconds even when the Display is switched OFF?

Replies (16)

photo
1

Good day Hubert,


this issue won't be probably connected to "Live tracking" service. It should be more general, please read this post if it helps: http://docs.locusmap.eu/doku.php?id=manual:faq:gps_lost_fix_android6 and let me know.


Other alternative is enabled "GPS auto-off" feature in settings > GPS.

photo
1

Hello Menion,


thx 4 your quick answer. I did some more Tests.


First I switched of "Energy saving". But the result after it is the same. One Point every 5 Minutes when display is off.


It can't be a GPS problem., because track recording every 10 Seconds is working fine even when the display is switched off.

So it switched on notification if the is a problem with sending LiveTracking points, but I never got an notification that there occurred a problem.


So I don't know where the problem is.

GPS can't be the problem - this is working with Track recording.

no mobile data connection ? then I should get problems and a notification when trying to send the points, or not?


I attached some screenshots, to show which results I get.

The first number is the points that haven sent.

Is the second number the number of problems? So there haven't been some.

photo
1

Hello Hubert,


interesting. I'm checking a code and seems that only option that left and that may affect this, is internet connection. You are correct that second number in notification bar say number of failed attempts, but here it works little bit different. Because Locus is optimized to battery as much as possible, Live tracking service allows to disable GPS in case of internet connection is not available! So I wanted to say, that if you turn off screen and your device turn off internet connection, Live tracking also disable GPS if it's not needed.


Maybe you may try to start Live tracking together with track recording. Because track recording do not allow to disable GPS, so you should then see a negative numbers in top status bar, because GPS signal was valid, but there were no internet connection.


hope my description was clear. Let me know, but I'm almost sure it will be this problem ( mainly because I see no other option ).

photo
1

Hello Menion,


I exactly did this this morning. Live Tracking and Track Recording have been running parallel with inactive display.

The result:

Track Recording: One GPS Point every 10 Seconds.

Live Tracking: One GPS Point (URL-Call) every 5 Minutes - with no Errors when sending the points (1st Screenshot).

photo
1

Thank you Hubert,


nice mystery. May I ask you for some help? Here is a special version: https://docs.google.com/a/asamm.com/uc?id=0B_Nr4CT8osmtWHFDMnRPR09LbEE&export=download . Try live tracking for a while and when you will be sure, values are not send in expected interval, but again once per 5 minutes, then completely close Locus. In "Locus/logs" directory should be a log so send me it. Thanks!

photo
1

Hi Menion,

here is the requested log and the times I received the points. Seems like the whole app is sleeping for 5 minutes?!?

2016-05-13 22:00:34 -- display off

2016-05-13 21:55:34 -- display off

2016-05-13 21:52:34 -- switched display off

2016-05-13 21:51:46 -- display on

2016-05-13 21:51:19 -- display on

Would you please remove the log after downloading? thx.

photo
1

one Point was missing: 2016-05-13 22:03:44 -- after i turned on the display again.


I have the same behaviour on a Samsung Galaxy A5.


Tomorrow i can do another test with paralell Live Tracking and Track Recording. I hope this will help too.


Thanks for trying to solve this mystery. ;-)

photo
1

Hmm it's exactly as you wrote. No error in Locus, no useful information ... just a big break in sending of events to your server.


So, please check GPS icon on main screen, do you see there also a black clock? Or check directly settings > gps > GPS auto-off function. If it is turned on, it may cause these troubles with certain settings. Otherwise I have absolutely no idea.


Method that are used in Live tracking function should wake up device in all cases, so this problem should not happen. Except running "GPS auto-off" function ...

photo
1

Hello Menio.

I did 3 more Tests.

1. Test with WLAN instead of mibile Internet - Same Problem. Log: WLAN....TXT

2. Test with "No GPS Auto Switch OFF" - same problem. NoGpsOff...TXT

3. Test with paralell "Track recording" and "Live Tracking" - same problem. ParallelRecording....TXT and Gpx-Track

I think it is no GPS problem, because rocording is working fine and live tracking not.

The strange thing is that live tracking sends its point every full 5 minutes. Xx.x5 and xx.x0 ?!?

photo
1

Well, thanks, I think I've got it ... http://stackoverflow.com/questions/35834832/android-alarmmanager-defaulting-to-5-minutes-when-phone-screen-is-off , read mainly first answer! Seems we are not alone :).


I have one idea how to improve it, so let me know how it will work with new version that will be published next week.

photo
1

Hello Menion.


This problem sounds like mine. Seems to be a samsung problem.

I hope your idea to solve it will help.


I'll let you know as soon I did a test with comming version.


Thanks for your effort. Great job.

So my Buddy tracker that I wrote as AddOn for Locus soon will work even better as now. :-)

photo
1

Hi Menion,


I think you made it :-D. My first test with new version from today was successful. After the first 3 points I turned off the display. Following points were sent I my wanted interval of 30 seconds.

2016-05-17 09:06:24 -- Dispay off

2016-05-17 09:05:53 -- Dispay off

2016-05-17 09:05:23 -- Dispay off

2016-05-17 09:04:52 -- Dispay off

2016-05-17 09:04:21 -- Dispay off

2016-05-17 09:03:50 -- Dispay off

2016-05-17 09:03:20 -- Dispay off

2016-05-17 09:02:50 -- Dispay off

2016-05-17 09:02:19 -- Dispay off

2016-05-17 09:01:49 -- Dispay on

2016-05-17 09:01:18 -- Dispay on

2016-05-17 09:00:48 -- Dispay on


I am still wondering why recording was working and tracking not?!? Can you shortly tell me?


Thanks a lot for fixing

photo
1

Newer Android versions have very "aggressive" energy saving behavior. They might (or might not) put your data connection to sleep for multiple minutes, even when Apps request to transfer data more often. The reasoning behind this is probably that GSM radio hardware usually has energy saving modes that might (or might not) kick in after a minute without data transfer.


This results in longer standby time, but also in people wondering why the heck they receive instant messages delayed or why Locus doesnt really send live points even when it should.

photo
1

On a related note: Samsung phones (e.g. the Note 4) suffer from an even stranger madness where the samsung-specific memory management simply force closes apps more or less at random, including Locus. It happened to me quite a few times on the Note 4... Locus would simply be gone even though it was recording a track. If you run Locus on a recent Samsung ROM and have it rooted, it is highly recommended to disable samsungs desastrous memory management. Read here for details: https://zapek.com/blog/how-to-make-your-galaxy-note-4-fast-again/

photo
1

Hello Hubert,


fine, good to hear it.


Live tracking system in Locus used method called "Alarm". If you defined 60 seconds timeout, then Locus fell asleep for them time and later system wake up Locus and tell "hey, send location now". And this "Alarm" timeout was changed, as joeloc wrote, by aggressive energy saver to value of 300 seconds (5 minutes).


My solution was, simply to remove this method. Now Live tracking system never asleep and it's still awake and handle received locations. I can do this here, because there is still working GPS in device and Locus service that handle GPS, so it is not a problem if this service do not sleep.


Anyway this problem bring explanation to exactly same problem with service "GPS auto-off". There is used exactly same method with "alarm". Unfortunately here is not any workaround. Using of "alarm" is essential for this feature as we need to allow to let device asleep for defined time. Keep it awake do not have sense.


I have to create some tool that will monitor if users device has this "virus" and notify user that this feature ( GPS Auto-off ) will work only with times higher then 5 minutes. Stupid ...


And thanks joeloc for the link. I'll forward it to Michal, maybe he will find it useful for our manual.

photo
1

Hi all,


thanks for the explanation and for fixing this. All my tests with the new version an an interval of 30 seconds worked fine.


I think this topic can be closed.

Replies have been locked on this page!