# wx.startBeaconDiscovery(Object object)
Start from base library version 1.2.0. Please remaining backward compatible.
with Promise style call: Supported
Mini Program plugin: Support, need to Mini Program base library version no less than 1.9.6
Start searching nearby. Beacon equipment
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
uuids | Array.<string> | yes | Beacon Device broadcast UUID list | |
ignoreBluetoothAvailable | boolean | false | no | Verify the Bluetooth switch, only in the iOS Under effective. iOS 11 Turn off the bluetooth in the control panel, or you can still use it. Beacon Service. |
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) |
# error
Error code | Error message | Introductions |
---|---|---|
0 | ok | normal |
11000 | unsupport | System or device does not support |
11001 | bluetooth service unavailable | Bluetooth service not available |
11002 | location service unavailable | Location service unavailable |
11003 | already start | The search has begun. |
11004 | not startBeaconDiscovery | Search hasn't started yet. |
11005 | system error | System error |
11006 | invalid data | Incorrect parameters |
# sample code
wx.startBeaconDiscovery({
success(res) { }
})