traccar / traccar-client-android

Traccar Client for Android
https://www.traccar.org/client
Apache License 2.0
659 stars 727 forks source link

Frequency of location updates #475

Closed flamingm0e closed 2 weeks ago

flamingm0e commented 2 weeks ago

Describe the bug This is difficult to describe, in a way.

I use Traccar on several Android devices for presence detection, etc for my family.

On my wife's phone (currently Pixel 8, previously happened on Pixel 5) the frequency between location updates is very sporadic and doesn't reflect the settings we configured (60 seconds). When looking at the Traccar web page replays, this is noticeable. If she is driving and plugged into Android Auto, updates are correct and track is as expected.

On my son's phone (currently my old Samsung Galaxy S23+, previously happened on Pixel 3A XL), we have it configured the same as my wife's. Same problem, but he does not use Android Auto so cannot verify it works correctly there.

My current phone (Pixel 9 Pro XL) is exhibiting the same behavior, but since I am typically the one driving, and connected to Android Auto, my tracks look correct, except for the times that I am not connected to AA (went for a walk last night at a park, and track is all over the place, but as soon as I got back in my car and headed home, it was normal again. Same for when I had to drop my car off for service yesterday and ride in my wife's car)

To Reproduce Steps to reproduce the behavior: Drive with AA running and Traccar frequency configured to 1-60 seconds Then drive without AA running and Traccar frequency configured to the same 1-60 seconds

Expected behavior I expect consistent updates based on the frequency configured.

Smartphone (please complete the following information):

Additional context I have been troubleshooting this behavior for a while and only just noticed today the correlation with AA running. I have verified battery optimization is set to unrestricted and all location permissions are accurate. I have been a Traccar user for about 7 years across multiple devices.

The ONE device I am not having any symptoms on, is my DMD T665 (rugged android phone used as dedicated GPS navigation) mounted in my car and motorcycle. Since it sits in a cradle all the time I have the frequency set to 10 seconds and it is ALWAYS accurate and is never running Android Auto.

My initial thoughts are this is related to GPS/location provider, or something like "passive location" where it's grabbing location from GPS being broadcast from another app.

I'm stumped and not sure where to look.

YES, I HAVE GONE THROUGH THE TROUBLESHOOTING CLIENT PAGE

tananaev commented 2 weeks ago

You never mentioned what settings you have in the app. Most importantly - accuracy.

flamingm0e commented 2 weeks ago

You never mentioned what settings you have in the app. Most importantly - accuracy.

Everything in the app is default except for server, and frequency, so location accuracy is Medium on all devices.

tananaev commented 2 weeks ago

Medium means cell/wifi based location, which does not guarantee a regular frequent updates. If you want GPS with exactly timing, you have to set high accuracy.