WifiManager.AddNetworkResult


public static final class WifiManager.AddNetworkResult
extends Object implements Parcelable

java.lang.Object
   ↳ android.net.wifi.WifiManager.AddNetworkResult


Provides the results of a call to WifiManager.addNetworkPrivileged(android.net.wifi.WifiConfiguration)

Summary

Constants

int STATUS_ADD_PASSPOINT_FAILURE

Generic failure code for adding a passpoint network.

int STATUS_ADD_WIFI_CONFIG_FAILURE

Generic failure code for adding a non-passpoint network.

int STATUS_FAILURE_UNKNOWN

The operation has failed due to an unknown reason.

int STATUS_FAILURE_UPDATE_NETWORK_KEYS

Internal failure in updating network keys..

int STATUS_INVALID_CONFIGURATION

The network configuration is invalid.

int STATUS_INVALID_CONFIGURATION_ENTERPRISE

The enterprise network is missing either the root CA or domain name.

int STATUS_NO_PERMISSION

The calling app does not have permission to call this API.

int STATUS_NO_PERMISSION_MODIFY_CONFIG

The calling app has no permission to modify the configuration.

int STATUS_NO_PERMISSION_MODIFY_MAC_RANDOMIZATION

The calling app has no permission to modify the MAC randomization setting.

int STATUS_NO_PERMISSION_MODIFY_PROXY_SETTING

The calling app has no permission to modify the proxy setting.

int STATUS_SUCCESS

The operation has completed successfully.

Inherited constants

Fields

public static final Creator<WifiManager.AddNetworkResult> CREATOR

Implement the Parcelable interface

public final int networkId

The identifier of the added network, which could be used in other operations.

public final int statusCode

One of the STATUS_ values.

Public constructors

AddNetworkResult(int statusCode, int networkId)

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

STATUS_ADD_PASSPOINT_FAILURE

Added in API level 31
public static final int STATUS_ADD_PASSPOINT_FAILURE

Generic failure code for adding a passpoint network.

Constant Value: 3 (0x00000003)

STATUS_ADD_WIFI_CONFIG_FAILURE

Added in API level 31
public static final int STATUS_ADD_WIFI_CONFIG_FAILURE

Generic failure code for adding a non-passpoint network.

Constant Value: 4 (0x00000004)

STATUS_FAILURE_UNKNOWN

Added in API level 31
public static final int STATUS_FAILURE_UNKNOWN

The operation has failed due to an unknown reason.

Constant Value: 1 (0x00000001)

STATUS_FAILURE_UPDATE_NETWORK_KEYS

Added in API level 31
public static final int STATUS_FAILURE_UPDATE_NETWORK_KEYS

Internal failure in updating network keys..

Constant Value: 9 (0x00000009)

STATUS_INVALID_CONFIGURATION

Added in API level 31
public static final int STATUS_INVALID_CONFIGURATION

The network configuration is invalid.

Constant Value: 5 (0x00000005)

STATUS_INVALID_CONFIGURATION_ENTERPRISE

Added in API level 31
public static final int STATUS_INVALID_CONFIGURATION_ENTERPRISE

The enterprise network is missing either the root CA or domain name.

Constant Value: 10 (0x0000000a)

STATUS_NO_PERMISSION

Added in API level 31
public static final int STATUS_NO_PERMISSION

The calling app does not have permission to call this API.

Constant Value: 2 (0x00000002)

STATUS_NO_PERMISSION_MODIFY_CONFIG

Added in API level 31
public static final int STATUS_NO_PERMISSION_MODIFY_CONFIG

The calling app has no permission to modify the configuration.

Constant Value: 6 (0x00000006)

STATUS_NO_PERMISSION_MODIFY_MAC_RANDOMIZATION

Added in API level 31
public static final int STATUS_NO_PERMISSION_MODIFY_MAC_RANDOMIZATION

The calling app has no permission to modify the MAC randomization setting.

Constant Value: 8 (0x00000008)

STATUS_NO_PERMISSION_MODIFY_PROXY_SETTING

Added in API level 31
public static final int STATUS_NO_PERMISSION_MODIFY_PROXY_SETTING

The calling app has no permission to modify the proxy setting.

Constant Value: 7 (0x00000007)

STATUS_SUCCESS

Added in API level 31
public static final int STATUS_SUCCESS

The operation has completed successfully.

Constant Value: 0 (0x00000000)

Fields

CREATOR

Added in API level 31
public static final Creator<WifiManager.AddNetworkResult> CREATOR

Implement the Parcelable interface

networkId

Added in API level 31
public final int networkId

The identifier of the added network, which could be used in other operations. This field will be set to -1 if the operation failed.

Public constructors

Public methods

describeContents

Added in API level 31
public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

writeToParcel

Added in API level 31
public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES