2***@qq.com
2***@qq.com
  • 发布:2019-06-03 16:09
  • 更新:2019-09-12 11:43
  • 阅读:2207

hbuilderX h5+的蓝牙插件

分类:HTML5+

h5+的蓝牙调用如下方法:

// 获取已搜索到的蓝牙设备
function getBluetoothDevices(){
plus.bluetooth.getBluetoothDevices({
success:function(e){
var devices = e.devices;
console.log('get devices success: '+e.length);
for(var i in devices){
console.log(i+': '+JSON.stringify(devices[i]));
}
},
fail:function(e){
console.log('get devices failed: '+JSON.stringify(e));
}
});
}

只能获得:{"deviceId":"ED:67:37:19:67:1C","name":"ADV","RSSI":-70,"localName":"ADV","advertisServiceUUIDs":[],"advertisData":{}},但是我需要的是 onLeScan: function(device, rssi, scanRecord) 方法中的scanRecord里面的内容,前两个可以看到,最后这个scanRecord没有键值,请问有什么办法可以得到scanRecord的值么

2019-06-03 16:09 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com

你好 我都获取不到 能帮忙看下嘛

该问题目前已经被锁定, 无法添加新回复