I'm building an app to track a marketing employee's location, route, and distance from the time they punch in until they punch out. This requires the app to continue tracking in the background, even when it is closed.
The Problem
My app's background service is not running persistently on Android, even after following the official documentation and best practices. The service is started, but it stops working when the app is minimized. The database is not updated periodically.