Android BLE BluetoothGattCallback not work

2019-08-28 17:30发布

问题:

I want my ble service run in background even App is closed, that I can still read data. So I used "startService" instead of "bindService". I initialize & connect ble, but I have no idea why my BluetoothGattCallback doesnt work? Here is my code. Thanks.

回答1:

Your onCharacteristicRead() method is empty. You have to read the received amount of bytes in this method.