# wx.startLocationUpdateBackground(Object object)
Start from base library version 2.8.0. Please remaining backward compatible.
with Promise style call: Supported
User authorization: Need scope.userLocationBackground
Mini Program plugin: Not supported
Open the Mini Program before the background are receiving location messages, you need to guide the user to open[To grant authorization]((open-ability/authorize#Background positioning))After authorization, the Mini Program can accept location changes while running or when entering the background.
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
success | function | no | Interface calls the successful callback function | |
fail | function | no | Interface calls failed callback functions | |
complete | function | no | Callback function at the end of an interface call (both successful and unsuccessful calls are executed) |
# Be careful
- Android WeChat version 7.0.6, iOS Support for this interface from version 7.0.5
- You need to configure required BackgroundModes in apagejson: ['location']After use
- Get location information ConfigureDxplaination of geographical location and use。