279476466@qq.com
279476466@qq.com
  • 发布:2019-06-03 16:09
  • 更新:5 天前
  • 阅读:266

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 分享
已邀请:
1565676679@qq.com

1565676679@qq.com

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

要回复问题请先登录注册