mendhak / gpslogger

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

Allow to log only the latest location to custom url after network connection restored #1025

Closed andras3189 closed 1 year ago

andras3189 commented 2 years ago

Description

In case custom url logging is enabled and there is no network connection, the http requests are queued until the network connection is restored. In case the user is only interested in the most recent gps location, this can be disadvantageous because sending all the queued requests might take some time.

Example use case

This means after the phone has network connection again, it will take 6 minutes to send the queued requests. The most recent location will be sent at latest, at the end of 6 minutes.

Possible solution

To keep the current behavior for users interested in all logged locations and support also to only send the latest location, a 'Discard offline locations' toggle would be introduced on the Custom URL settings page. With disabled toggle, everything works as before. If the toggle is enabled, only the latest location will be sent to custom url when the phone has network again.