Hi everyone,
I’m working on an Ionic Capacitor app that tracks the user’s geolocation and sends it to an API. The geolocation is working fine when the app is in the foreground. However, I need the app to continue sending the location even when it’s in the background or has been killed (terminated by the system or user).
I’ve looked into the Background Mode
plugin and Background Geolocation
packages, but I’m facing issues with keeping the geolocation tracking active when the app is terminated.
Requirements:
- Auto-send geolocation updates to the API when the app is in the background.
- Auto-send geolocation when the app is killed.
Has anyone successfully implemented background geolocation tracking with Capacitor or found a workaround for handling location updates even when the app is terminated? Any insights, suggestions, or code examples would be greatly appreciated!
Thanks in advance!