三星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回调.最有可能是复制粘贴错误

上一篇:深入理解ClassLoader(四)—类的父委托加载机制


下一篇:如何将数据(字符串)发送到android中的配对设备?