mendhak / gpslogger

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

last message on "STOP LOGGING" #1102

Closed jkdoshi closed 8 months ago

jkdoshi commented 1 year ago

Thank you for the (nearly) perfect app!

I am launching it from a webapp using the gpslogger://properties/... hyperlink. And my server returns a profile that sends POST to my webapp's custom URL. So now the webapp can track the phone's GPS. Perfect!

Just one imperfection :-(

Testing the app and looking at all documentation, I couldn't find this --- Is there a way to make the app send one last final POST before stopping logger? It would be even better if one of the params in %ALL indicated that we are stopping now (e.g. stop=1 or %STOP)? This should happen regardless of any time or distance minimum limits. That would tell the app that GPSlogger is stopping and also what it's last position/timestamp was.

mendhak commented 8 months ago

Hi I suggest to do this via the broadcast, you can get another application to listen for the stopping event and do something based on that. See: https://gpslogger.app/#listeningtogpslogger

And the reason is, the Custom URL only happens in reaction to a point being logged, and it comes with its own overheads, background management, and retry mechanisms. Asking the app to stop and send a custom URL then means not actually stopping. That's why the broadcast makes more sense.