BluetoothLeScanner.startScan with Android 6.0 does not discover devices BluetoothLeScanner.startScan with Android 6.0 does not discover devices android android

BluetoothLeScanner.startScan with Android 6.0 does not discover devices


Is you app prompting for Location permission on startup? If it's not, handle the code somewhere else so that it is being prompted.

Also you can check this to test if your app is working fine:

Open Settings > Apps > YourApplication > Permissionsand enable Location and then try to scan for results.

Location will be listed under permissions only if you have provided ACCESS_COARSE_LOCATION on manifest.


Using the solutions provided above works but the side effect is that you have to have location services turned on for something that doesn't need it. An ugly and unsatisfying work around is to specify the target version in your manifest to

android:targetSdkVersion="21"

It allows scanning on my Nexus 7 even though the installed version is 6.0.1. I do not know what the side effects are of targeting a lower version than the installed version but at least scanning works. Might be the only solution for GPS-less devices (if such devices exist).

Google should be crucified for this.