第一次进入页面后开启wx.startBluetoothDevicesDiscovery,使用wx.onBluetoothDeviceFound监听搜索到的设备,但是滑动页面返回后,重新进入页面,重新加载wx.startBluetoothDevicesDiscovery,使用wx.onBluetoothDeviceFound搜索不到任何的蓝牙设备,这个问题如何解决?
网友回复
微盟:
此操作比较耗费系统资源,请在搜索到需要的设备后及时调用 wx.stopBluetoothDevicesDiscovery 停止搜索。可以监听页面返回调用停止搜索的api,重新进入后再重新监听;