wx.getBluetoothDevices 获取设备延时怎么解决?
发布于 5 年前 作者 mjin 4877 次浏览 来自 问答


场景:打开蓝牙适配器->打开发现周边设备  ->  然后每3秒调用wx.getBluetoothDevices()接口.

接口返回的数据有很长时间的延迟!。

比如:现在只有一个ble设备 a手机调用getBluetoothDevices接口返回1个设备。  然后b一个手机连接到ble设备。 a手机每个三秒调用一次getBluetoothDevices a设备依旧返回一个设备。  要过很长时间a手机的 getBluetoothDevices值才会刷新.     理论上b手机连接到ble设备后。 a手机应该立刻get不到ble设备。 。为什么会有这么长的延迟? 。 有没有解决办法然他快速更新?

1 回复

管理员呢。。       ???   wx.

wx.startBluetoothDevicesDiscovery

不能长时间打开吗?   怎么没人理啊。。

回到顶部