关于蓝牙状态的几个问题

发布于 6 年前作者 xia985782 次浏览最后编辑 6 年前来自 ask

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

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

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

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

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

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