Building a Node.js Telegram bot to track user routes, measure speed and duration. How can I register geolocation when the device is locked or app minimized?
hey, have you tried using the native background services? device settings and platform configs differ, so you might need to setup a foreground service on android or enable bg modes on ios. sometimes it acts buggy when minimized
In my experience managing geolocation in the background required careful integration of native APIs. I discovered that using dedicated modules that interface directly with iOS and Android native services helped overcome many of the limitations when an app is minimized. Careful attention to permission handling and adaptation to each platform’s restrictions was essential. For instance, on Android, a well-managed foreground service maintained reliability, while on iOS, setting up the appropriate background modes prevented location updates from pausing unexpectedly. Exploring platform-specific guides also provided valuable insights.