Android client going crazy , 2500+ update per day staying static at home ?!

tfoutfou20 days ago

Hi
Traccar has been working fine for more than a year , until recently , i just discoverd my android client is going crazy

i had more than 60000 update last week , with sometimes update at less than 1 second interval , i only got out a few times at less than 20 kilometers distance.

august 3988 update , september 134816 update (wtf) , october 64700 update

no settings have been changed or edited , didn't even open client app for the last 3 months(or maybe even more) , i just see notification on the locking screen and i know app is runing.

parameters was:
-Highest precision
-250 meters
-600 seconds interval
-angle OFF
-heartbeat stop 1200 seconds
-fastest interval 30 seconds
-offline buffering ON
-keep awake ON
-stop detection ON

tfoutfou20 days ago

(translated parameter name from french the best i can , don't know the exact original name)

also i never really find any documention describing what exactly the parameter does , expect guessing i don't know exactly what is happening

with fastest interval enable at 30 seconds , i would have guessed 2500 update a day could not happen , but it was not the case

just set to High precision , and it stopped updating like crazy , but it doesnt use GPS anymore right ??

also when i check logs , i see a lotttttt of things happening , when it should be idling right ??
with a lot of "Process LocationResult" , and a lot of INSERT and DESTROY , in fact this happen almost exactly every 1 second

lastly , regarding today or yesterday , with more than 3000 update , all my points are located at my house and no GPS position glitch , all is contained within a less than 10 meter radius

Anton Tananaev20 days ago
tfoutfou19 days ago

thanks for the link (that was not in Documentation at the top of the website)

however there is still a problem somewhere right ? especially when phone is at home and not even used/touched/moved

with fastest interval set to 30 seconds it still get more than 1000 update in the same location with no more than normal GPS drift of a few meter

.
join a quick screenshot from 2 day ago
traccar.png

tfoutfou19 days ago

even last night while sleeping , with set to High precision , distance 500 meter , and heartbeat at 1200 seconds

i get update Precisely every 600 or 300 seconds , sometime 10 minutes for 4-5 times , sometime 5 minutes for 4-5 times , and it alternate.

it should be 1200 seconds right ?

Thanks

tfoutfou19 days ago

just went on a 20km trip , phone unlocked with traccar client runing on front to be sure it is awake , 3 updates only ! speed 0kmh always

High setting seem unusable on my phone , and with highest it send update almost every second !

something is definitely broken somewhere

Anton Tananaev19 days ago
  • You should not expect heartbeat to be precise. That's because it uses work manager on Android, which is not precise. It is by design to save battery life.
  • Speed can be 0 when it is not a GPS location.
tfoutfou19 days ago

Could'nt you store the time in a variable and if not enough time have elapsed since the last time don't send and discard the data ?

I understand this is complicated , i have spent weeks writing some code for my own Arduino based tracker and it is still not perfect
but currently there is something in the android code that is not working , and i am not the only one affected by this i think

Currently i am stuck with Highest precision if i want anything usefull with my phone , but i can't have 3000+ updates when not moving !

Currently parameter like Fastest interval seem to have no effect , neither heartbeat , i would understand a higher heartbeat because android did not wake the process or something like that , but a shorter one should not happen unless managed the wrong way right ?

I am sorry for bothering you and take your precious time , but i am trying to help and figure out why this isn't working right , we have such a free amazing and open source project you created.

tfoutfou19 days ago

Also in the log when i have Highest precison activated , i see a lot of data !
i mean a lotttt , this in pulling GPS position precisely every second , this seem a little bit too much !?

GPS pulling time should be the same as "Fastest interval" right ? or could you add a new parameter to set this ?

what is the point of doing calculation every second ? doesn't this drain the battery very much ?

i don't know maybe this is only using a few CPU cycle and didn't drain much battery , but this is always waking GPS and that should use much battery right ?

it also log INSERT and DESTROY for the database at each pull of GPS , is this really usefull to write and delete data to the database if the data is just discarded a few milliseconds later ? shouldn't data be written in the database after it meet some requirement ?

Thanks again

Anton Tananaev19 days ago

Please don't send million questions at once.