Android BLE BluetoothGattCallback not work

强颜欢笑 提交于 2019-12-11 16:33:10

问题


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.



来源:https://stackoverflow.com/questions/22836739/android-ble-bluetoothgattcallback-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!