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_FAILUREGeneric failure code for adding a passpoint network. | 
| int | STATUS_ADD_WIFI_CONFIG_FAILUREGeneric failure code for adding a non-passpoint network. | 
| int | STATUS_FAILURE_UNKNOWNThe operation has failed due to an unknown reason. | 
| int | STATUS_FAILURE_UPDATE_NETWORK_KEYSInternal failure in updating network keys.. | 
| int | STATUS_INVALID_CONFIGURATIONThe network configuration is invalid. | 
| int | STATUS_INVALID_CONFIGURATION_ENTERPRISEThe enterprise network is missing either the root CA or domain name. | 
| int | STATUS_NO_PERMISSIONThe calling app does not have permission to call this API. | 
| int | STATUS_NO_PERMISSION_MODIFY_CONFIGThe calling app has no permission to modify the configuration. | 
| int | STATUS_NO_PERMISSION_MODIFY_MAC_RANDOMIZATIONThe calling app has no permission to modify the MAC randomization setting. | 
| int | STATUS_NO_PERMISSION_MODIFY_PROXY_SETTINGThe calling app has no permission to modify the proxy setting. | 
| int | STATUS_SUCCESSThe operation has completed successfully. | 
| Inherited constants | 
|---|
| Fields | |
|---|---|
| 
    public
    static
    final
    Creator<WifiManager.AddNetworkResult> | CREATORImplement the Parcelable interface | 
| 
    public
    
    final
    int | networkIdThe identifier of the added network, which could be used in other operations. | 
| 
    public
    
    final
    int | statusCodeOne of the  | 
| 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
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
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
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
public static final int STATUS_FAILURE_UPDATE_NETWORK_KEYS
Internal failure in updating network keys..
Constant Value: 9 (0x00000009)
STATUS_INVALID_CONFIGURATION
public static final int STATUS_INVALID_CONFIGURATION
The network configuration is invalid.
Constant Value: 5 (0x00000005)
STATUS_INVALID_CONFIGURATION_ENTERPRISE
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
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
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
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
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
public static final int STATUS_SUCCESS
The operation has completed successfully.
Constant Value: 0 (0x00000000)
Fields
CREATOR
public static final Creator<WifiManager.AddNetworkResult> CREATOR
Implement the Parcelable interface
networkId
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.
statusCode
public final int statusCode
One of the STATUS_ values. If the operation is successful this field
 will be set to STATUS_SUCCESS.
 
 Value is STATUS_SUCCESS, STATUS_FAILURE_UNKNOWN, STATUS_NO_PERMISSION, STATUS_ADD_PASSPOINT_FAILURE, STATUS_ADD_WIFI_CONFIG_FAILURE, STATUS_INVALID_CONFIGURATION, STATUS_NO_PERMISSION_MODIFY_CONFIG, STATUS_NO_PERMISSION_MODIFY_PROXY_SETTING, STATUS_NO_PERMISSION_MODIFY_MAC_RANDOMIZATION, STATUS_FAILURE_UPDATE_NETWORK_KEYS, or STATUS_INVALID_CONFIGURATION_ENTERPRISE
Public constructors
AddNetworkResult
public AddNetworkResult (int statusCode, 
                int networkId)Public methods
describeContents
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 0orCONTENTS_FILE_DESCRIPTOR | 
writeToParcel
public void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
| dest | Parcel: This value cannot benull. | 
| flags | int: Additional flags about how the object should be written.
 May be 0 orParcelable.PARCELABLE_WRITE_RETURN_VALUE.
 Value is either0or a combination ofParcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
