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 |
Constants
STATUS_ADD_PASSPOINT_FAILURE
static val STATUS_ADD_PASSPOINT_FAILURE: Int
Generic failure code for adding a passpoint network.
Value: 3STATUS_ADD_WIFI_CONFIG_FAILURE
static val STATUS_ADD_WIFI_CONFIG_FAILURE: Int
Generic failure code for adding a non-passpoint network.
Value: 4STATUS_FAILURE_UNKNOWN
static val STATUS_FAILURE_UNKNOWN: Int
The operation has failed due to an unknown reason.
Value: 1STATUS_FAILURE_UPDATE_NETWORK_KEYS
static val STATUS_FAILURE_UPDATE_NETWORK_KEYS: Int
Internal failure in updating network keys..
Value: 9STATUS_INVALID_CONFIGURATION
static val STATUS_INVALID_CONFIGURATION: Int
The network configuration is invalid.
Value: 5STATUS_INVALID_CONFIGURATION_ENTERPRISE
static val STATUS_INVALID_CONFIGURATION_ENTERPRISE: Int
The enterprise network is missing either the root CA or domain name.
Value: 10STATUS_NO_PERMISSION
static val STATUS_NO_PERMISSION: Int
The calling app does not have permission to call this API.
Value: 2STATUS_NO_PERMISSION_MODIFY_CONFIG
static val STATUS_NO_PERMISSION_MODIFY_CONFIG: Int
The calling app has no permission to modify the configuration.
Value: 6STATUS_NO_PERMISSION_MODIFY_MAC_RANDOMIZATION
static val STATUS_NO_PERMISSION_MODIFY_MAC_RANDOMIZATION: Int
The calling app has no permission to modify the MAC randomization setting.
Value: 8STATUS_NO_PERMISSION_MODIFY_PROXY_SETTING
static val STATUS_NO_PERMISSION_MODIFY_PROXY_SETTING: Int
The calling app has no permission to modify the proxy setting.
Value: 7STATUS_SUCCESS
static val STATUS_SUCCESS: Int
The operation has completed successfully.
Value: 0Public constructors
AddNetworkResult
AddNetworkResult(
statusCode: Int,
networkId: Int)
Public methods
describeContents
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
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
static val CREATOR: Parcelable.Creator<WifiManager.AddNetworkResult!>
Implement the Parcelable interface
networkId
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.
statusCode
val statusCode: Int
One of the STATUS_ values. If the operation is successful this field will be set to STATUS_SUCCESS.
Value is android.net.wifi.WifiManager.AddNetworkResult#STATUS_SUCCESS, android.net.wifi.WifiManager.AddNetworkResult#STATUS_FAILURE_UNKNOWN, android.net.wifi.WifiManager.AddNetworkResult#STATUS_NO_PERMISSION, android.net.wifi.WifiManager.AddNetworkResult#STATUS_ADD_PASSPOINT_FAILURE, android.net.wifi.WifiManager.AddNetworkResult#STATUS_ADD_WIFI_CONFIG_FAILURE, android.net.wifi.WifiManager.AddNetworkResult#STATUS_INVALID_CONFIGURATION, android.net.wifi.WifiManager.AddNetworkResult#STATUS_NO_PERMISSION_MODIFY_CONFIG, android.net.wifi.WifiManager.AddNetworkResult#STATUS_NO_PERMISSION_MODIFY_PROXY_SETTING, android.net.wifi.WifiManager.AddNetworkResult#STATUS_NO_PERMISSION_MODIFY_MAC_RANDOMIZATION, android.net.wifi.WifiManager.AddNetworkResult#STATUS_FAILURE_UPDATE_NETWORK_KEYS, or android.net.wifi.WifiManager.AddNetworkResult#STATUS_INVALID_CONFIGURATION_ENTERPRISE