Reputation: 1
I used Workmanager + Geolocator to update the location of the driver every minute, the program works and updates everything and sends it to the server, but when the application is running in the background, it still sends every minute only the location of the driver sends the same thing when he last entered the application, but how can to make it so that it would update the background ?? enter image description here enter image description here
I want to update location even when the app is in background
Upvotes: 0
Views: 158
Reputation: 3
Try using the package flutter_background_geolocation
. However, it requires you to buy a license if you want to build it in release mode.
https://pub.dev/packages/flutter_background_geolocation
If you don't want to use this package, try using background_fetch
package. You will have to write your own logic to update the location though.
https://pub.dev/packages/background_fetch
Upvotes: 0