ejain
ejain

Reputation: 3614

How to list Bluetooth Low Energy devices on Android 4.3?

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?

Upvotes: 0

Views: 3235

Answers (2)

ejain
ejain

Reputation: 3614

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"/>

Upvotes: 3

user2637046
user2637046

Reputation: 11

For me it works. Not very well though. (after some tests it will start disconnecting and I need to toggle the bluetooth on <--> off).

Have you missed something? What kind of device you are trying to find?

Upvotes: 0

Related Questions