How to update the user's location when the app runs in background?

Hi,
I’m using the Geolocation plugin to watch the position of the user.
This is the code I’m using:

this.geolocation.watchPosition(geo_options)
.subscribe(position => {
  this.currentLatitude = position.coords.latitude;
  this.currentLongitude = position.coords.longitude;
  this.currentAltitude = position.coords.altitude;
  this.currentHeading = position.coords.heading;
  this.currentSpeed = position.coords.speed;
}, err => {
	console.log('@@@ERR-watchPosition:', err);
});

It seems that the position is not updated when the app is not in foreground.
Is there a way to update the user’s location when the app is not in foreground that works for both Android and iOS?

Thank you very much

Claudio

Transistorsoft.com has a great plugin. There is a license fee for Android. Great support and updates. Well worth the money!