搜索蓝牙设置了allowDuplicatesKey: false不允许重复上报,苹果手机无效?
搜索附近蓝牙设备设置了不允许重复上报,wx.onBluetoothDeviceFound在苹果14依然上报了重复的设备,华为上正常 wx.startBluetoothDevicesDiscovery({ allowDuplicatesKey: false, //不允许重复上报 // services: [''],//指定services搜索 0000ffe0-0000-1000-8000-00805f9b34fb success: function (res) { console.log("开始搜索附近蓝牙设备") that.setData({ searchingstatus: true, disabled: true, }) that.onBluetoothDeviceFound() onBluetoothDeviceFound() { wx.onBluetoothDeviceFound((res) => { res.devices.forEach(device => { this.data.devices.push(device) this.setData({ devices: this.data.devices }) }) }) },