Skip to main content
Version: 3.x

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.

Reference

Type

(option?: Option) => Promise<WifiError>

Parameters

Option

PropertyTypeRequiredDescription
complete(res: any) => voidNoThe callback function used when the API call completed (always executed whether the call succeeds or fails)
fail(res: any) => voidNoThe callback function for a failed API call
success(res: Result) => voidNoThe callback function for a successful API call

API Support

APIWeChat Mini-ProgramH5React Native
Taro.getWifiList✔️