# wx.getWifiList(Object object)

Start from base library version 1.6.0. Please remaining backward compatible.

with Promise style call: Supported

Mini Program plugin: Support, need to Mini Program base library version no less than 2.9.1

Request access Wi-Fi List.wifiList The data will be stored onGetWifiList Registered in a callback. Android Need before call User authorization scope.userLocation。

iOS Will jump to the system settings in the WeChat settings page, the user needs to manually enterWireless local area networkSet page, and scan the system to the device after the Mini Program can receive onGetWifiList Callback. Android Will not jump.

# 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)

# error

Error code Error message Introductions
0 ok normal
12000 not init Uncalled startWifi interface
12001 system not support Current system does not support related capabilities
12002 password error Wi-Fi Password error
12003 connection timeout Connection Timeout
12004 duplicate request Repeat connection Wi-Fi
12005 wifi not turned on Android Unique, unopened Wi-Fi switch
12006 gps not turned on Android Unique, unopened GPS Positioning switch
12007 user denied User denied authorization link Wi-Fi
12008 invalid SSID invalid SSID
12009 system config err System Operator Configuration Denial of Connection Wi-Fi
12010 system internal error Other system errors require a errmsg Print the specific reason for the error
12011 weapp in background Application cannot be configured in the background Wi-Fi
12013 wifi config may be expired System saved Wi-Fi Configuration expired, recommended to forget Wi-Fi Retry

# Be careful

Due to system problems, this method is iOS 11.0 and 11.1 Two versions expired. But in iOS 11.2 Has been fixed in.