dd.onBLECharacteristicValueChange
。
参数 | 类型 | 是否必填 | 说明 |
---|---|---|---|
deviceId | String | 是 | 蓝牙设备 id,参考 device 对象。 |
serviceId | String | 是 | 蓝牙特征值对应 service 的 uuid。 |
characteristicId | String | 是 | 蓝牙特征值的 uuid。 |
descriptorId | String | 否 | notify 的 descriptor 的 uuid (只有android 会用到,非必填,默认值00002902-0000-10008000-00805f9b34fb)。 |
state | Boolean | 否 | 是否启用notify或indicate。 |
success | Function | 否 | 调用成功的回调函数。 |
fail | Function | 否 | 调用失败的回调函数。 |
complete | Function | 否 | 调用结束的回调函数(调用成功、失败都会执行)。 |
【钉钉】API开发者 微信交流群
用微信扫右侧二维码,加入【钉钉】API开发者 交流群,互助沟通