wx.onSearchBeacons 监听不到蓝牙设备?
发布于 5 年前 作者 fang04 8672 次浏览 来自 官方Issues

 //开启扫描beacon功能

                    setTimeout(function () {

                        wx.startSearchBeacons({

                            ticket: “”,

                            complete: function (res) {

                                if (res.errMsg.indexOf(‘bluetooth power off’) > -1) { alert(“请打开蓝牙”); }

                                else {

                                    //监控扫描beacon

                                    wx.onSearchBeacons({ complete: function (argv) { alert(JSON.stringify(argv)); } });

                                }

                                //继续扫描

                                $extend.startSearchBeacons();

                            }

                        });

                    }, 2000);

1 回复

你好,麻烦具体描述问题,提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部