-
-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
got LocationServiceDisabledException
when `Geolocator.isLocationServiceEnabled() return true
#585
Comments
I have the same error but only when changing
|
I am looking into this issue but having a hard time to reproduce it. Maybe you can answer the following questions and help me debug this issue:
Looking forward for feedback so we can tackle this thing. |
I got the same Position position = await Geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.low); even if the location service for that app is enabled.
|
I tried it and it works with medium accuracy. But it doesnt with any other settings.
|
Got the same error and it also doesn't work with any settings. Tested on both emulator and real device with location always on. |
It seems for me to be only working on best accuracy. But it doesn't for others.
|
Thank you all for providing some more feedback. We are currently looking into it but still not able to reproduce it. This probably has something to do with specific settings being enabled/ disabled. When we find out we will of course let you know. In the meantime we are open for additional information (i.e. does this occur on all Android API's or only Android 10). |
I have same error. https://prnt.sc/vr3glj |
I get the same issue only when the device is not connected to a network(WIFI or MOBILE) and i'm inside a building(i.e.: poor GPS connection) current stream settings: AndroidManifest.xml: Device location settings: High Accuracy (Use GPS, Wi-Fi, Bluetooth and mobile networks to determine location) |
Thank you @seb3n this is very helpful information. I am sure this will give me something to go on. |
@mvanbeusekom I have the same issue on Android 9 |
isLocationServiceEnabled is true
|
This piece of code worked for me. |
This is my attempt to create a minimal reproducible error
Adding all the permissions in the AndroidManifest
STEPS TO REPRODUCE
Considerations
Which works fine if the user tap the "Change" button, gets redirected to the Location Service Settings, turn it on and goes back to the app, but it won't work if the user just enables it from the status bar (the stream simply stops returning values after that). Other idea is to use |
I did another test on a physical device with Android 8.0.0 freshly installed API call
Results for each
AndroidManifest.xml
Device settingsDevice location settings: High Accuracy (Use GPS, Wi-Fi, and mobile networks) |
I have just released version 6.1.10 of the geolocator plugin which should solve this problem. Turned out in Android the Thanks everyone for reporting, clarifying and helping out reproducing the issue. |
I have the same error, I have reproduced it on the xiaomi Redmi Note 8, while on a huawei p20 lite it works fine. |
Like @sejr1996 I have detected the same problem with version 6.1.13 in Nokia 3.1 (android 9), Galaxy A10s (android 10)
|
I'm getting same |
I belive it's fixed already. My last resort to fix the service location was to use the location package. but now with the new version of geolocator package. the location permission comes first, then the service location follow. |
Throws this, doesn't show live location neither asks for permissions, also the buttons on google maps don't work. `import 'dart:async'; class Map extends StatefulWidget { class _MapState extends State { Position currentPosition; void locatePosition() async {
} static final CameraPosition _kGooglePlex = CameraPosition( @OverRide |
Hi, I'm facing the same problem with geolocator: ^7.1.0 |
@tehsunnliu have you found any solution to this. Some of our clients are also facing the same issue. |
Hi. For now the solution that I've used is, I've given an option to the user that if the package fails to get location then the user can set their location manually. I wasn't getting this problem when I was using older version of flutter and Geolocator package. However after updating everything to the latest some of my users have started complaining about this problem. |
Hello, I am using geolacator ^10.1.0 with a real Android 13 device, and it is unstable. I still have this problem, when I start my app with the GPS enabled and all permissions enabled as well, it works fine, but when you disable the GPS in the quick access bar, the top bar, and enable it again, it no longer works the service, the coordinates stop and no longer work |
🐛 Bug Report
Expected behavior
try to get the current location after location permission is granted, and the location service is enabled too, but i got
LocationServiceDisabledException
whengetCurrentPosition
is calledReproduction steps
Configuration
all permissions related are granted, and all configurations in Android are done.
Version: 6.1.5
Platform:
The text was updated successfully, but these errors were encountered: