Description
Please check the following before submitting a new issue.
- I have searched the existing issues.
- I have carefully read the documentation.
Please select for which platform(s) you need help
- Android
- iOS
- Linux
- macOS
- Web
- Windows
Your question
Hello. We have integrated your location library but when the app is switched to the background on an iOS device, the interception of positioning changes stops within a few seconds. It works in the foreground but when the app is minimized it stops.
We have followed your example with the following code.
final LocationSettings locationSettings = LocationSettings(
accuracy: LocationAccuracy.high,
distanceFilter: 100,
);
StreamSubscription positionStream = Geolocator.getPositionStream(locationSettings: locationSettings).listen(
(Position? position) {
print(position == null ? 'Unknown' : 'Geolocator ${position.latitude.toString()}, ${position.longitude.toString()}');
});
info.plist
UIBackgroundModes
fetch
location
processing
remote-notification
How can we use the library so that, when the application is in the background, it does not constantly send position changes to a server?
Thanks
Version
12.0.0