Skip to content
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

Closed
alexhisen opened this issue Mar 19, 2020 · 3 comments · Fixed by #614
Closed

ACCESS_FINE_LOCATION is required for Android 10 #579

alexhisen opened this issue Mar 19, 2020 · 3 comments · Fixed by #614

Comments

@alexhisen
Copy link

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.

@randdusing
Copy link
Owner

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

@lazydan
Copy link

lazydan commented May 4, 2020

The scan() function would work fine on Android 10 after i add the ACCESS_FINE_LOCATION permission to plugin.xml file.

@NunoSav
Copy link
Contributor

NunoSav commented Jun 16, 2020

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.

NunoSav added a commit to NunoSav/cordova-plugin-bluetoothle that referenced this issue Jun 16, 2020
jholthusen added a commit to jholthusen/BluetoothSerial that referenced this issue Feb 16, 2021
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 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants