What are the steps to get notified by Bluetooth Low Energy (BLE) device?

后端 未结 4 951
慢半拍i
慢半拍i 2021-01-31 12:20

I am working on a Bluetooth Low Energy (BLE) app. I have a BLE device (scale) which measures weight. I am able to connect with this device. But I am not getting how to read data

4条回答
  •  不要未来只要你来
    2021-01-31 13:01

    Had a device which required me to use

    descriptor.setValue(BluetoothGattDescriptor.ENABLE_INDICATION_VALUE)
    

    instead of

    descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE)
    

    as explained in this question

    Android BLE API: GATT Notification not received

提交回复
热议问题