Subscribe to a BLE Gatt notification Android

后端 未结 2 764
失恋的感觉
失恋的感觉 2021-02-02 09:58

I´m developing an BLE app, based on the Gatt sample project provided by google: https://developer.android.com/samples/BluetoothLeGatt/index.html. So, I can send data writing in

2条回答
  •  情歌与酒
    2021-02-02 10:40

    In addition to the accepted answer, I had to set the Characteristic to WRITE_TYPE_DEFAULT when subscribing to peripheral running on OS X.

    characteristic.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT);
    

提交回复
热议问题