mendhak / gpslogger

:satellite: Lightweight GPS Logging Application For Android.
https://gpslogger.app
Other
2k stars 609 forks source link

Improve offline locations logging #1061

Closed Cabanon closed 9 months ago

Cabanon commented 1 year ago

I was so happy when the option to not discard offline locations was added, it was the only thing that kept me using Traccar Client but I have some concerns on the way it works.

I think that checking if the network is available is not the right thing to check to add a location to the queue because it makes points disappear in many situations:

I think that the only thing that should indicate if a point can be "forgotten" is if the request is successful (or event better, if we can validate that it has returned a HTTP status code we choose in the app)

Right now the functionality is here but I can't use it in my daily life, I'm losing too much data

mendhak commented 9 months ago

Yes it's definitely true, there can be conditions that cause failure enough times that it stops getting tracked. The problem becomes that the app can only remember a location a fixed number of times, because at some point the retries will need to stop because of battery concerns, as well as because the app can get killed due to system constraints, so there will always be a loss at some point.

For that reason there's only a limited number of retries. It's not an uncommon situation though, that the built-in retry logic just isn't enough, I've seen a few other threads where they use third party applications eg Syncthing, to do the backup separately. I do wish the 'network is available' check could be better, it's only as good as the OS says it is, which is varied.

Anyway sorry I've got no good solution for this.