Added in API level 31

AddNetworkResult

class AddNetworkResult : Parcelable
kotlin.Any
   ↳ android.net.wifi.WifiManager.AddNetworkResult

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

Summary

Constants
static Int

Generic failure code for adding a passpoint network.

static Int

Generic failure code for adding a non-passpoint network.

static Int

The operation has failed due to an unknown reason.

static Int

Internal failure in updating network keys.

static Int

The network configuration is invalid.

static Int

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

static Int

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

static Int

The calling app has no permission to modify the configuration.

static Int

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

static Int

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

static Int

The operation has completed successfully.

Inherited constants
Public constructors
AddNetworkResult(statusCode: Int, networkId: Int)

Public methods
Int

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<WifiManager.AddNetworkResult!>

Implement the Parcelable interface

Int

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

Int

One of the STATUS_ values.

Constants

STATUS_ADD_PASSPOINT_FAILURE

Added in API level 31
static val STATUS_ADD_PASSPOINT_FAILURE: Int

Generic failure code for adding a passpoint network.

Value: 3

STATUS_ADD_WIFI_CONFIG_FAILURE

Added in API level 31
static val STATUS_ADD_WIFI_CONFIG_FAILURE: Int

Generic failure code for adding a non-passpoint network.

Value: 4

STATUS_FAILURE_UNKNOWN

Added in API level 31
static val STATUS_FAILURE_UNKNOWN: Int

The operation has failed due to an unknown reason.

Value: 1

STATUS_FAILURE_UPDATE_NETWORK_KEYS

Added in API level 31
static val STATUS_FAILURE_UPDATE_NETWORK_KEYS: Int

Internal failure in updating network keys..

Value: 9

STATUS_INVALID_CONFIGURATION

Added in API level 31
static val STATUS_INVALID_CONFIGURATION: Int

The network configuration is invalid.

Value: 5

STATUS_INVALID_CONFIGURATION_ENTERPRISE

Added in API level 31
static val STATUS_INVALID_CONFIGURATION_ENTERPRISE: Int

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

Value: 10

STATUS_NO_PERMISSION

Added in API level 31
static val STATUS_NO_PERMISSION: Int

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

Value: 2

STATUS_NO_PERMISSION_MODIFY_CONFIG

Added in API level 31
static val STATUS_NO_PERMISSION_MODIFY_CONFIG: Int

The calling app has no permission to modify the configuration.

Value: 6

STATUS_NO_PERMISSION_MODIFY_MAC_RANDOMIZATION

Added in API level 31
static val STATUS_NO_PERMISSION_MODIFY_MAC_RANDOMIZATION: Int

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

Value: 8

STATUS_NO_PERMISSION_MODIFY_PROXY_SETTING

Added in API level 31
static val STATUS_NO_PERMISSION_MODIFY_PROXY_SETTING: Int

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

Value: 7

STATUS_SUCCESS

Added in API level 31
static val STATUS_SUCCESS: Int

The operation has completed successfully.

Value: 0

Public constructors

Public methods

describeContents

Added in API level 31
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

writeToParcel

Added in API level 31
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

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_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 31
static val CREATOR: Parcelable.Creator<WifiManager.AddNetworkResult!>

Implement the Parcelable interface

networkId

Added in API level 31
val networkId: Int

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