其他分享
首页 > 其他分享> > 三星Android BLE多重读/写

三星Android BLE多重读/写

作者:互联网

在Samsung 4.2到4.3 BLE App迁移指南(http://developer.samsung.com/ble)中,它说:

The synchronous nature of the stack and F/W hasn’t been affected. That
is, if we call for example, writeCharacteristic for a particular
characteristic, if it returns true, the next call to any
BluetoothGatt or BluetoothGattServer method should be done after the
onCharacteristicRead callback is received. This is because the stack is designed to support and process only one GATT call at a
time, and if, for example, you call writeCharacteristic or
readCharacteristic of any characteristic soon after the first one, it
is ignored.

本段是否有错误?当我需要多次写入时,为什么我需要在每次写入之前/之后读取该特性?我认为应该是这样的:

.. That is, if we call for example, writeCharacteristic for a
particular characteristic, if it returns true, the next call to any
BluetoothGatt or BluetoothGattServer method should be done after the
onCharacteristicWrite callback is received. …

解决方法:

是的,它当然是onCharacteristicWrite回调.最有可能是复制粘贴错误

标签:android-bluetooth,bluetooth,bluetooth-lowenergy,android,characteristics
来源: https://codeday.me/bug/20191121/2055784.html