Udostępnij za pośrednictwem


WifiManager.ConfiguredNetworks Property

Definition

Return a list of all the networks configured for the current foreground user.

public virtual System.Collections.Generic.IList<Android.Net.Wifi.WifiConfiguration>? ConfiguredNetworks { [Android.Runtime.Register("getConfiguredNetworks", "()Ljava/util/List;", "GetGetConfiguredNetworksHandler")] get; }
[<get: Android.Runtime.Register("getConfiguredNetworks", "()Ljava/util/List;", "GetGetConfiguredNetworksHandler")>]
member this.ConfiguredNetworks : System.Collections.Generic.IList<Android.Net.Wifi.WifiConfiguration>

Property Value

a list of network configurations in the form of a list of WifiConfiguration objects.

Attributes

Remarks

Return a list of all the networks configured for the current foreground user.

Not all fields of WifiConfiguration are returned. Only the following fields are filled in: <ul> <li>networkId</li> <li>SSID</li> <li>BSSID</li> <li>priority</li> <li>allowedProtocols</li> <li>allowedKeyManagement</li> <li>allowedAuthAlgorithms</li> <li>allowedPairwiseCiphers</li> <li>allowedGroupCiphers</li> <li>status</li> </ul>

This member is deprecated. a) See WifiNetworkSpecifier.Builder#build() for new mechanism to trigger connection to a Wi-Fi network. b) See #addNetworkSuggestions(List), #removeNetworkSuggestions(List) for new API to add Wi-Fi networks for consideration when auto-connecting to wifi. <b>Compatibility Note:</b> For applications targeting android.os.Build.VERSION_CODES#Q or above, this API will always fail and return an empty list. <p> Deprecation Exemptions: <ul> <li>Device Owner (DO), Profile Owner (PO) and system apps will have access to the full list. <li>Callers with Carrier privilege will receive a restricted list only containing configurations which they created. </ul>

Java documentation for android.net.wifi.WifiManager.getConfiguredNetworks().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to