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的值么
1 个回复
1***@qq.com
你好 我都获取不到 能帮忙看下嘛