Android 蓝牙获取不到notify数据
wx.notifyBLECharacteristicValueChange({
state: true,
deviceId: deviceId,
serviceId: serviceId,
characteristicId: cId,
success: function (res) {
console.log(‘notify success’, res) //执行后会打印 notify success
},fail:function(){
console.log(‘notify fail’, res)
}
})
wx.onBLECharacteristicValueChange(function(res) {
console.log(‘收到蓝牙通知 :’);//Android上一直没有回调。IOS上则会打印“收到蓝牙通知”
})