Does the sample code from the official documentation work for anyone? After doing startLeScan
, the onLeScan
callback never gets called (Nexus 4, Android 4.3).
Meanwhile, another app that I have installed (BLE Heart Rate) doesn't seem to have any issues finding nearby Bluetooth LE devices (Fitbit One, Polar H7), so I must be missing something?
I forgot to add the BLUETOOTH_ADMIN
permission. Without this permission, one can still call startLeScan
,it just won't ever discover any devices!
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>