- 小程序调用哪个API 可以实现 弹出 微信申请蓝牙权限窗口?
[图片] 这个小程序是怎么实现的?是调用原生代码吗?
07-15 - 小程序怎么调用微信申请蓝牙权限弹窗?
[图片]
07-15 - 官方来看下Websocket 局域网通信?
const socketTask=wx.connectSocket({ url: 'ws://192.168.203.1:8642', success: () => { log.info('connectSocket 连接成功') }, }) socketTask.onOpen((res)=>{ log.info('WebSocket连接已打开!readyState=' + that.obj.localSocket.readyState) }) socketTask.onError((res)=> { log.info('Socket onError' ,res) }) 大部分手机都可以通信,华为荣耀 nova 连接成功,没有open回调,提示{"errMsg":"fail:url not in domain list"}
2022-04-19 - IOS UDPSocket.send 报错?
{errMsg: "send: fail sendUDPSocketMessage:fail function cannot run on service"} const udp = wx.createUDPSocket() const udpPort = udp.bind() console.log("udp client port: " + udpPort) 打印: udp client port: undefined udp.send({ address: '255.255.255.255', port: 8642, message: '111' }) {errMsg: "send: fail sendUDPSocketMessage:fail function cannot run on service"} configure-network.js:254 Error: send: fail sendUDPSocketMessage:fail function cannot run on service at Function.eval (configure-network.js:22) at d (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:118602) at X.eval (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:119052) at X.emit (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:851105) at Object.emit (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:856276) at r.fail (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:2121339) at d (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:118602) at Object.eval [as fail] (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:119052) at eval (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:863630) at St (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:863782)
2022-03-09