cordovagpslocation

Get gps location in Cordova while in background


Everything seems deprecated. I tried mauron85/cordova-plugin-background-geolocation but it's own dependencies are 404. cordova-plugin-geolocation doesn't work while in the background.

Does anyone have a configuration for getting the gps while the app is in the background? I need to use them within the javascript, not even send them directly to the backend.


Solution

  • You can't use JavaScript if the app is in the background, as it is halted, hence you need to send to a server, then pull from the server from your JavaScript when the app is resumed (via the foreground event). What are the dependencies that you report as 404, out of curiosity?