关于蓝牙状态的几个问题
发布于 4 年前 作者 xia98 5601 次浏览 来自 问答

1.开启蓝牙扫描后,用户手动关闭iOS蓝牙,这时出发了wx.onBluetoothAdapterStateChange,里面discorvery=true。

2.还有,当discover开启/关闭,不会触发wx.onBluetoothAdapterStateChange回调吗?

1 回复
  1. 开启蓝牙扫描后,用户手动关闭iOS蓝牙,这时出发了wx.onBluetoothAdapterStateChange,里面discorvery=true。

    这里存在蓝牙关闭时扫描状态没有及时更新的情况,下版本fix

  2. 还有,当discover开启/关闭,不会触发wx.onBluetoothAdapterStateChange回调吗?

       可以通过startBluetoothDevicesDiscoverystopBluetoothDevicesDiscovery的回调 来判定 ,下版本也会和安卓平台一起对齐,会触发回调

回到顶部