-
-
Notifications
You must be signed in to change notification settings - Fork 621
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
Geolocator.getCurrentPosition() is not returning latitude or longitude. #609
Comments
Are you testing on iOS or Android? B.t.w. make sure you enable location updates on the simulator/ emulator. This can be done in the settings of the simulator/ emulator. Also the simulator/ emulator doesn't always play nice with |
I am working on an Android emulator. I don't need to get a high accuracy location so I only requested permission for accessing the coarse location. After I saw @mvanbeusekom's comment I wanted to try However after adding that permission, BOTH low and high accuracy requests worked for me. Interesting. |
I will close this issue for now. It is a known issue that the Android emulator doesn't play nice with the COARSE permissions. This is due to the fact that COARSE location tries to triangulate the position based on cellular network, which on the emulator is not available. |
It worked fine for me when LocationAccuracy changed to high. Thanks !! |
Thanks for info |
Geolocator.getCurrentPosition() is not working for emulator. However, it is working on a real device.
This is the code and print(position) is not printing latitudes and longitudes.
The text was updated successfully, but these errors were encountered: