You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code works on a Pixel 6, but not on a Samsung phone. I've tried a couple of Samsung phones running Android 13 and 14. They work the same. While running a Foreground Service, the code works when the app is in the foreground, when the app in in the background the geolocator engine detaches. When the app returns to the to the foreground the geolocator updates continue. What am I doing wrong?
Starting from Android 10 you need to add the ACCESS_BACKGROUND_LOCATION permission (next to the ACCESS_COARSE_LOCATION or the ACCESS_FINE_LOCATION permission) if you want to continue receiving updates even when your App is running in the background (note that the geolocator plugin doesn't support receiving and processing location updates while running in the background):
I am Facing same issue
Geolocator.getPositionStream().listen((Position position) {
currentPosition = position;
myPostion = position;
LatLng mPostion = LatLng(position.latitude, position.longitude);
when app is in background in samsung update version 1 april 2024 when app is in background then location is
not fetch only work in foreground only new latest version it is not working
Please check the following before submitting a new issue.
Please select for which platform(s) you need help
Your question
This code works on a Pixel 6, but not on a Samsung phone. I've tried a couple of Samsung phones running Android 13 and 14. They work the same. While running a Foreground Service, the code works when the app is in the foreground, when the app in in the background the geolocator engine detaches. When the app returns to the to the foreground the geolocator updates continue. What am I doing wrong?
D/FlutterGeolocator(16946): Detaching Geolocator from activity
D/FlutterGeolocator(16946): Flutter engine disconnected. Connected engine count 1
D/FlutterGeolocator(16946): Disposing Geolocator services
E/FlutterGeolocator(16946): Geolocator position updates stopped
on line 163 never returns, or since I added the timeout it gets a timeout.
Version
^11.0.0
The text was updated successfully, but these errors were encountered: