蓝牙api,安卓订阅通知, 写入特征后, 特征改变回调不执行,iOS执行
如果您确认安卓订阅特征通知后, 特征改变后,会执行特征改变回调请告诉我.
2.iOS获取不到蓝牙advertisData, iPhone SE 测试无advertisData,
3.device.name, iOS返回蓝牙设备名称, 安卓返回蓝牙completeLocalname
4.wx.onBluetoothDeviceFound(function (res) res值,iPhone和安卓返回类型不一致
wx.notifyBLECharacteristicValueChange({
state: true,
deviceId: deviceId,
serviceId: serviceId,
characteristicId: characteristicId,
success: function (res) {
console.log(“订阅成功 =” + characteristicId)
wx.onBLECharacteristicValueChange(function (res) {
console.log(“特征改变” + res)
})
},
complete: function (res) {
console.log(“订阅结果 =” + res.errMsg)
}
})
订阅成功 后,数据写人, onBLECharacteristicValueChange iOS回调执行, 安卓回调不执行