Home > front end >  How to update the user location with Geolocator if the app is in the Foreground?
How to update the user location with Geolocator if the app is in the Foreground?

Time:05-20

The app should update the rider's location every second whatever the app is alive or in the foreground, I tried to install the Geolocator and it succeed but whenever the app is in that background or in the Foreground it stops responding.How to solve with that issue.

Some recommend me to work with workmanager !?

CodePudding user response:

Push the latitude and longitude of the device from within the background service using background_locater plugin

CodePudding user response:

To push location in foreground through foreground service and even when device reboots you can use following library

https://pub.dev/packages/background_locator

  • Related