-
-
Notifications
You must be signed in to change notification settings - Fork 119
[@nativescript/geolocation] android 12: No location is returned if the new approximate location option is selected #196
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
Comments
Hi everyone. Has anyone had a different experience when testing geolocation on Android 12? |
I'm seeing the same issue, did you end up finding a solution? |
I'm seeing the same issue. It seems that @nativescript/geolocation only asks for ACCESS_FINE_LOCATION (you can see that in file index.android.js). It uses nativescript-permissions to do so. And if you use the other method existing in nativescript-permissions that uses array of permissions (requestPermissions), it will fail as well as, if I understood it correctly, the method checks if both are granted. It would be great if this was fixed, or at least have a workaround proposed in the mean time. |
…ion' of https://github.com/INiiS/NSplugins into fix/NativeScript#196-android12-geolocation-coarse-location
Hi, we recently updated a test device to Android 12 and came across an issue with the geolocation plugin.
We are calling the enableLocationRequest function and the new Android 12 permission request comes up and we then choose approximate location on the device. Calling getCurrentLocation afterwards throws an error with just the following content
{ "android.permission.ACCESS_FINE_LOCATION": false }
.First we tried changing the accuracy when fetching the location, but using CoreTypes.Accuracy.high or CoreTypes.Accuracy.any makes no difference.
We also tried to request both ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION together. We got nearly the same error
{ "android.permission.ACCESS_FINE_LOCATION": false, "android.permission.ACCESS_COARSE_LOCATION": true }
but no location even though ACCESS_COARSE_LOCATION was granted.If fine location access in granted on the device, getCurrentLocation returns the correct location.
What do we need to do in order to allow the user to use only approximate location on Android 12?
Thank you in advance 😊
The text was updated successfully, but these errors were encountered: