Skip to content Skip to sidebar Skip to footer

Location Needs To Be Enabled For Bluetooth Low Energy Scanning On Android 10.0

After upgrading my Pixel XL to Android version 10.0 Bluetooth Low Energy (BLE) scanning will only work if i have Location turned on. This has not been an issue until now and it's w

Solution 1:

As of Android 10, it is now required to have ACCESS_FINE_LOCATION turned on in order to perform Bluetooth operations. The reason for this is that Bluetooth can be used to gather information about the location of the user (e.g. using BLE beacons), and for that the relevant app permission should be declared.

For Android 9 and lower, ACCESS_COARSE_LOCATION is sufficient which is probably why your app was working without an issue.

More information can be found here:-

I hope this helps.

Solution 2:

on android 10 ask these three permission

<uses-permissionandroid:name="android.permission.BLUETOOTH" /><uses-permissionandroid:name="android.permission.ACCESS_FINE_LOCATION" /><uses-permissionandroid:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>

declare in manifest and also ask at runtime

Post a Comment for "Location Needs To Be Enabled For Bluetooth Low Energy Scanning On Android 10.0"