-
Notifications
You must be signed in to change notification settings - Fork 354
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
ACCESS_FINE_LOCATION is required for Android 10 #579
Comments
It looks like there are also some permission changes required for scanning in the background. I don't have any Android devices to test on anymore, so hopefully someone else can raise a PR. https://developer.android.com/about/versions/10/privacy/changes#app-access-device-location |
The scan() function would work fine on Android 10 after i add the ACCESS_FINE_LOCATION permission to plugin.xml file. |
I've tried to change COARSE to FINE in the source code and it worked and then i tried changing plugin.xml seperately and it did not work. |
For Android 10 and above, FINE_LOCATION access seems to be required to allow bluetooth scanning. See similar issue here: randdusing/cordova-plugin-bluetoothle#579 .
On Android, if you target SDK 29 (Android 10), then in hasPermission/requestPermission() you must use ACCESS_FINE_LOCATION instead of ACCESS_COARSE_LOCATION. The manifest should also request both of them.
The text was updated successfully, but these errors were encountered: