Language

WifiManager.AddNetworkPrivileged(WifiConfiguration) Method

Definition

This is a new version of addNetwork(WifiConfiguration) which returns more detailed failure codes.

[Android.Runtime.Register("addNetworkPrivileged", "(Landroid/net/wifi/WifiConfiguration;)Landroid/net/wifi/WifiManager$AddNetworkResult;", "GetAddNetworkPrivileged_Landroid_net_wifi_WifiConfiguration_Handler", ApiSince=31)]
public virtual Android.Net.Wifi.WifiManager.AddNetworkResult AddNetworkPrivileged(Android.Net.Wifi.WifiConfiguration config);
[<Android.Runtime.Register("addNetworkPrivileged", "(Landroid/net/wifi/WifiConfiguration;)Landroid/net/wifi/WifiManager$AddNetworkResult;", "GetAddNetworkPrivileged_Landroid_net_wifi_WifiConfiguration_Handler", ApiSince=31)>]
abstract member AddNetworkPrivileged : Android.Net.Wifi.WifiConfiguration -> Android.Net.Wifi.WifiManager.AddNetworkResult
override this.AddNetworkPrivileged : Android.Net.Wifi.WifiConfiguration -> Android.Net.Wifi.WifiManager.AddNetworkResult

Parameters

config
WifiConfiguration

the set of variables that describe the configuration, contained in a WifiConfiguration object. If the WifiConfiguration has an Http Proxy set the calling app must be System, or be provisioned as the Profile or Device Owner. This value cannot be null.

Returns

A AddNetworkResult Object. This value cannot be null.

Attributes

Remarks

This is a new version of addNetwork(WifiConfiguration) which returns more detailed failure codes. The usage of this API is limited to Device Owner (DO), Profile Owner (PO), system app, and privileged apps.

Add a new network description to the set of configured networks. The networkId field of the supplied configuration object is ignored. The new network will be marked DISABLED by default. To enable it, call enableNetwork(int, boolean).

Android reference for android.net.wifi.WifiManager.addNetworkPrivileged.

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