小程序 蓝牙搜索问题
发布于 5 年前 作者 xxiong 19948 次浏览 来自 问答

手机系统已连接的设备C1_GJPRHEGFLE96M7EB

在微信小程序使用

[onBluetoothDeviceFound]

[getBluetoothDevices]

[getConnectedBluetoothDevices] 

皆搜不到该设备


方法如下:

xdCloseBluetoothAdapter(function() { // 关闭蓝牙模块,使其进入未初始化状态

xdOpenBluetoothAdapter(function() { //初始化小程序蓝牙模块成功

xdOnBluetoothDeviceFound(function(device) { // 搜寻新设备

console.log(“搜索到的新设备”, device)

xdWxStartBluetoothDevicesDiscovery() // 开始搜索

}, function() { //初始化小程序蓝牙模块失败

failBack()

})

})

@官方  求解答

3 回复

请问下解决了吗?

手机系统连接中的设备,确实不能再搜索到了啊。

连接中的设备不会再广播了。

可能含有不适合的内容?不能回复?

回到顶部