Live tracking solution for OsmAnd

I previously shared my transition from Komoot to OsmAnd, and after some time, I’ve grown accustomed to its comprehensive capabilities. Whether for cycling, hiking, or general navigation, OsmAnd truly functions as a versatile “Swiss Army knife” for offline mobile navigation and tracking.

A key feature I frequently utilized with Komoot Premium was its live tracking functionality. When out on my bike, I could send a link to my partner, allowing her to monitor my real-time location. This offered peace of mind, particularly in case of an unforeseen incident.

OsmAnd, being primarily an offline-based application, lacks a built-in live tracking feature. While I do leverage OsmAnd Cloud for synchronizing tracks and settings between my primary phone and my secondary outdoor phone, the cloud service does not offer live tracking.

However, I discovered a workaround: within the Android app’s trip recording plugin, there’s an “Online tracking” setting. Once configured, OsmAnd can send an HTTP request at a specified interval to a custom endpoint.

While services like TravelMap exist that integrate with this feature, they often come with a higher price tag than OsmAnd Pro itself and offer far more functionalities than I require.

This led me to quickly develop my own solution. I created a simple Go-based tool, easily deployable with Docker, that receives and stores location data in a lightweight SQLite database. A corresponding web frontend (just plain HTML and some vanilla JS with Leaflet), connected via a WebSocket, displays the current location on a map and provides a history of the last three hours.

The foundational code was generated by Gemini Pro 2.5 (Preview), which I then adapted to its final state, sometimes with the assistance of GitHub Copilot Free. Without the help of Copilot, I doubt it would have been as thoroughly covered with tests and documentation. 😄

Feel free to check out the project on GitHub!

What I also learned from this project: Creating a simple green field project is easy with AI, but the more code you have, the harder it gets to work with AI. Copilot sometimes ignores the context or doesn’t know what you really want to achieve. And you shouldn’t blindly trust the output. Verify every single line. I had to fix or let Copilot fix quite a lot of code.

Interactions & Comments