export const startAdvertising = () => {
if (!bleInfo.peripheralServer) return;
bleInfo.peripheralServer.startAdvertising({
advertiseRequest: {
deviceName: bleInfo.deviceName,
serviceUuids: [bleInfo.serviceId],
},
powerLevel: "medium",
success: (res) => {
console.log("开启广播成功", res);
},
fail: (err) => {
console.log("开启广播失败", err);
},
complete: (res) => {
console.log("开启广播完成", res);
},
});
};
在ios中开启广播没问题,在安卓就报错,err如图
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)