收藏
回答

wx.startLocationUpdateBackground 后台时无法收到通知?

wx.startLocationUpdateBackground配合wx.onLocationChange接口使用,测试发现小程序至于后台后,无法收到位置变化通知。以下是错误信息:

onLocationChangeError {type: "string", description: "onLocationChangeError", value: "onLocationChangeError"} [object Object] {type: "object", description: "[object Object]", objectId: "74", className: "Object", preview: {type: "object", description: "[object Object]", properties: [{name: "errStr", type: "string", description: "ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF", value: "ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF"}, {name: "errCode", type: "number", description: "2", value: 2}], overflow: true}}

代码片段:https://developers.weixin.qq.com/s/V8ftqYmV79Kk

回答关注问题邀请回答
收藏

1 个回答

  • Arvin
    Arvin
    03-19

    reportRealtimeAction 是不是这个问题

    03-19
    有用
    回复
登录 后发表内容