I’m trying to implement a function in a ionic app that combines the background-worker, the geolocation and the local notification plugins. Every 30s the background worker should request gps coordinates and send to a REST endpoint, if the endpoint returns “true” the local-notification plugin should queue a new notification.
All of this works fine when the app is in foreground mode. When it is in background mode the getCurrentLocation() fails. The rest of the functionality keeps working.
A’m I missing to set a permission og is it simply not possible to retrieve gps coordinates when in background mode?
Hope that someone can help me whit this issue, thanks.