getBluetoothDevices调用成功,找不到设备
发布于 6 年前 作者 xiafang 10749 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

使用wx.getBluetoothDevices API成功,但是搜索不到设备,暂时只发现这款机型出现

  • 预期表现

可以搜到蓝牙设备

  • 复现路径
  • 提供一个最简复现 Demo

wx.openBluetoothAdapter({

    success: function (res) {

        wx.startBluetoothDevicesDiscovery({

            services: [],

            allowDuplicatesKey: false,

            interval: 0,

            success: (res) => {

                setTimeout(() => {

                    wx.getBluetoothDevices({

                        success: (res) => {

                            console.log(res)

                        }

                    })

                }, 3000)

            }

        })

    }

})

1 回复

你好,请提供出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

回到顶部