I have a BLE app that has hundreds of happy users on a variety of devices. Most of my testing has been done on Nexus devices, but a user reported an issue with HTC M8 so I just bought one. Sure enough, for some reason connectGatt
isn't working. It doesn't throw any exceptions and the BluetoothGatt object it returns isn't null. But onConnectionStateChange
in the BluetoothGattCallback I pass in is never called.
I found a few reports that some phones needed connectGatt to be called on the UI thread, so I tried that but nothing changed.
Here's the log I get:
D/BluetoothGatt: connect() - device: CE:FA:92:61:A3:4F, auto: false
D/BluetoothGatt: registerApp()
D/BluetoothGatt: registerApp() - UUID=f7a1a0e9-0d45-4b71-9457-9adf6ccb4bf8
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
Then silence...
Any ideas? Thanks!