Taro.getWifiList(option)
Requests to get the list of Wi-Fi networks. It returns wifiList
data in the callback of onGetWifiList
registration. User Authorization is required for scope.userLocation before this method is called on Android.
After a call is made, the user will be redirected to the system's Wi-Fi network interface on iOS but not on Android. This method does not work on iOS 11.0 and iOS 11.1 due to system reasons, but is available on iOS 11.2.
Type
(option?: Option) => Promise<WifiError>
Parameters
Option
Property | Type | Required | Description |
---|---|---|---|
complete | (res: any) => void | No | The callback function used when the API call completed (always executed whether the call succeeds or fails) |
fail | (res: any) => void | No | The callback function for a failed API call |
success | (res: Result) => void | No | The callback function for a successful API call |
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
Taro.getWifiList | ✔️ |