Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/net/wifi/WifiConfiguration#nestedclasses) \| [Constants](https://developer.android.com/reference/android/net/wifi/WifiConfiguration#constants) \| [Inherited Constants](https://developer.android.com/reference/android/net/wifi/WifiConfiguration#inhconstants) \| [Fields](https://developer.android.com/reference/android/net/wifi/WifiConfiguration#lfields) \| [Ctors](https://developer.android.com/reference/android/net/wifi/WifiConfiguration#pubctors) \| [Methods](https://developer.android.com/reference/android/net/wifi/WifiConfiguration#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/net/wifi/WifiConfiguration#inhmethods)

# WifiConfiguration

*** ** * ** ***

` public class WifiConfiguration `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/os/Parcelable `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.wifi.WifiConfiguration |

<br />

*** ** * ** ***

A class representing a configured Wi-Fi network, including the security configuration. Non privileged caller should use `https://developer.android.com/reference/android/net/wifi/WifiNetworkSpecifier.Builder` to create `https://developer.android.com/reference/android/net/NetworkSpecifier` and `https://developer.android.com/reference/android/net/wifi/WifiNetworkSuggestion.Builder` to create `https://developer.android.com/reference/android/net/wifi/WifiNetworkSuggestion`. This class can still be used with privileged APIs only such as `https://developer.android.com/reference/android/net/wifi/WifiManager#addNetwork(android.net.wifi.WifiConfiguration)`.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.AuthAlgorithm` Recognized IEEE 802.11 authentication algorithms. |
| ` class` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.GroupCipher` Recognized group ciphers. |
| ` class` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.GroupMgmtCipher` Recognized group management ciphers. |
| ` class` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.KeyMgmt` Recognized key management schemes. |
| ` class` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.PairwiseCipher` Recognized pairwise ciphers for WPA. |
| ` class` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.Protocol` Recognized security protocols. |
| ` class` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.Status` Possible status of a network configuration. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_AUTO` Let the wifi framework automatically decide the MAC randomization strategy. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_NONE` Use factory MAC when connecting to this network |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_NON_PERSISTENT` Use a randomly generated MAC address for connections to this network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_PERSISTENT` Generate a randomized MAC once and reuse it for all connections to this network |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_DPP` Security type for Easy Connect (DPP) network |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP` Security type for an EAP network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_SUITE_B` *This constant was deprecated in API level 30. Use the `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT` constant (which is the same value).* |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE` Security type for a WPA3-Enterprise network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT` Security type for a WPA3-Enterprise in 192-bit security network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_OPEN` Security type for an open network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_OWE` Security type for an OWE network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_PSK` Security type for a PSK network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_SAE` Security type for an SAE network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_WAPI_CERT` Security type for a WAPI Certificate network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_WAPI_PSK` Security type for a WAPI PSK network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_WEP` Security type for a WEP network. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

| ### Fields ||
|---|---|
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#BSSID` When set, this network configuration entry should only be used when associating with the AP having the specified BSSID. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#FQDN` Fully qualified domain name of a Passpoint configuration |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SSID` The network's SSID. |
| ` public boolean` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#allowAutojoin` Auto-join is allowed by user for this network. |
| ` public https://developer.android.com/reference/java/util/BitSet` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#allowedAuthAlgorithms` The set of authentication protocols supported by this configuration. |
| ` public https://developer.android.com/reference/java/util/BitSet` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#allowedGroupCiphers` The set of group ciphers supported by this configuration. |
| ` public https://developer.android.com/reference/java/util/BitSet` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#allowedGroupManagementCiphers` The set of group management ciphers supported by this configuration. |
| ` public https://developer.android.com/reference/java/util/BitSet` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#allowedKeyManagement` The set of key management protocols supported by this configuration. |
| ` public https://developer.android.com/reference/java/util/BitSet` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#allowedPairwiseCiphers` The set of pairwise ciphers for WPA supported by this configuration. |
| ` public https://developer.android.com/reference/java/util/BitSet` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#allowedProtocols` The set of security protocols supported by this configuration. |
| ` public https://developer.android.com/reference/java/util/BitSet` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#allowedSuiteBCiphers` The set of SuiteB ciphers supported by this configuration. |
| ` public https://developer.android.com/reference/android/net/wifi/WifiEnterpriseConfig` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#enterpriseConfig` The enterprise configuration details specifying the EAP method, certificates and other settings associated with the EAP. |
| ` public boolean` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#hiddenSSID` This is a network that does not broadcast its SSID, so an SSID-specific probe request must be used for scans. |
| ` public boolean` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#isHomeProviderNetwork` Flag indicating if this network is provided by a home Passpoint provider or a roaming Passpoint provider. |
| ` public int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#networkId` The ID number that the supplicant uses to identify this network configuration entry. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#preSharedKey` Pre-shared key for use with WPA-PSK. |
| ` public int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#priority` *This field was deprecated in API level 26. This field does not exist anymore.* |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#providerFriendlyName` Name of Passpoint credential provider |
| ` public long[]` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#roamingConsortiumIds` Roaming Consortium Id list for Passpoint credential; identifies a set of networks where Passpoint credential will be considered valid |
| ` public boolean` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#shared` True if this network configuration is visible to and usable by other users on the same device, false otherwise. |
| ` public int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#status` The current status of this network configuration entry. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#wepKeys` *This field was deprecated in API level 28. Due to security and performance limitations, use of WEP networks is discouraged.* |
| ` public int` | `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#wepTxKeyIndex` *This field was deprecated in API level 28. Due to security and performance limitations, use of WEP networks is discouraged.* |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#WifiConfiguration()() ` |
| ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#WifiConfiguration(android.net.wifi.WifiConfiguration)(https://developer.android.com/reference/android/net/wifi/WifiConfiguration source) ` Copy constructor |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#describeContents()() ` Implement the Parcelable interface |
| ` https://developer.android.com/reference/android/net/ProxyInfo` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#getHttpProxy()() ` Returns the HTTP proxy used by this object. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#getKey()() ` Return a String that can be used to uniquely identify this WifiConfiguration. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#getMacRandomizationSetting()() ` Get the MAC randomization setting for this network. |
| ` https://developer.android.com/reference/android/net/MacAddress` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#getRandomizedMacAddress()() ` Returns MAC address set to be the local randomized MAC address. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#isAllowedToUpdateByOtherUsers()() ` Whether this wifi configuration is allowed to be updated by other users. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#isDppConfigurator()() ` To check if this WifiConfiguration supports configuring a peer Enrollee device with SECURITY_TYPE_DPP |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#isPasspoint()() ` Identify if this configuration represents a Passpoint network |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#setAllowedToUpdateByOtherUsers(boolean)(boolean isAllowed) ` Allows this network configuration to be updated by other users. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#setHttpProxy(android.net.ProxyInfo)(https://developer.android.com/reference/android/net/ProxyInfo httpProxy) ` Set the `https://developer.android.com/reference/android/net/ProxyInfo` for this WifiConfiguration. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#setIpConfiguration(android.net.IpConfiguration)(https://developer.android.com/reference/android/net/IpConfiguration ipConfiguration) ` Set the `https://developer.android.com/reference/android/net/IpConfiguration` for this network. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#setMacRandomizationSetting(int)(int macRandomizationSetting) ` Set the MAC randomization setting for this network. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#setSecurityParams(int)(int securityType) ` Set the various security params to correspond to the provided security type. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/WifiConfiguration#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Implement the Parcelable interface |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/android/os/Parcelable ` ` abstract int` ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() `

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
` abstract void` ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) `

Flatten this object in to a Parcel.

## Constants

### RANDOMIZATION_AUTO

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RANDOMIZATION_AUTO
```

Let the wifi framework automatically decide the MAC randomization strategy.

<br />

Constant Value: 3 (0x00000003)

### RANDOMIZATION_NONE

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RANDOMIZATION_NONE
```

Use factory MAC when connecting to this network

<br />

Constant Value: 0 (0x00000000)

### RANDOMIZATION_NON_PERSISTENT

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RANDOMIZATION_NON_PERSISTENT
```

Use a randomly generated MAC address for connections to this network. This option does not persist the randomized MAC address.

<br />

Constant Value: 2 (0x00000002)

### RANDOMIZATION_PERSISTENT

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RANDOMIZATION_PERSISTENT
```

Generate a randomized MAC once and reuse it for all connections to this network

<br />

Constant Value: 1 (0x00000001)

### SECURITY_TYPE_DPP

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_DPP
```

Security type for Easy Connect (DPP) network

<br />

Constant Value: 13 (0x0000000d)

### SECURITY_TYPE_EAP

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_EAP
```

Security type for an EAP network.

<br />

Constant Value: 3 (0x00000003)

### SECURITY_TYPE_EAP_SUITE_B

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_EAP_SUITE_B
```

<br />

**This constant was deprecated in API level 30.**   

Use the `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT` constant (which is the same value).

Security type for a WPA3-Enterprise in 192-bit security network.

<br />

Constant Value: 5 (0x00000005)

### SECURITY_TYPE_EAP_WPA3_ENTERPRISE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_EAP_WPA3_ENTERPRISE
```

Security type for a WPA3-Enterprise network.

<br />

Constant Value: 9 (0x00000009)

### SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT
```

Security type for a WPA3-Enterprise in 192-bit security network. This is the same as `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_SUITE_B` and uses the same value.

<br />

Constant Value: 5 (0x00000005)

### SECURITY_TYPE_OPEN

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_OPEN
```

Security type for an open network.

<br />

Constant Value: 0 (0x00000000)

### SECURITY_TYPE_OWE

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_OWE
```

Security type for an OWE network.

<br />

Constant Value: 6 (0x00000006)

### SECURITY_TYPE_PSK

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_PSK
```

Security type for a PSK network.

<br />

Constant Value: 2 (0x00000002)

### SECURITY_TYPE_SAE

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_SAE
```

Security type for an SAE network.

<br />

Constant Value: 4 (0x00000004)

### SECURITY_TYPE_WAPI_CERT

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_WAPI_CERT
```

Security type for a WAPI Certificate network.

<br />

Constant Value: 8 (0x00000008)

### SECURITY_TYPE_WAPI_PSK

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_WAPI_PSK
```

Security type for a WAPI PSK network.

<br />

Constant Value: 7 (0x00000007)

### SECURITY_TYPE_WEP

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SECURITY_TYPE_WEP
```

Security type for a WEP network.

<br />

Constant Value: 1 (0x00000001)

## Fields

### BSSID

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String BSSID
```

When set, this network configuration entry should only be used when associating with the AP having the specified BSSID. The value is a string in the format of an Ethernet MAC address, e.g., `XX:XX:XX:XX:XX:XX` where each `X` is a hex digit.

<br />

### FQDN

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String FQDN
```

Fully qualified domain name of a Passpoint configuration

<br />

### SSID

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String SSID
```

The network's SSID. Can either be a UTF-8 string, which must be enclosed in double quotation marks (e.g., `"MyNetwork"`), or a string of hex digits, which are not enclosed in quotes (e.g., `01a243f405`).

<br />

### allowAutojoin

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean allowAutojoin
```

Auto-join is allowed by user for this network. Default true.

<br />

### allowedAuthAlgorithms

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BitSet allowedAuthAlgorithms
```

The set of authentication protocols supported by this configuration. See `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.AuthAlgorithm` for descriptions of the values. Defaults to automatic selection.

<br />

### allowedGroupCiphers

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BitSet allowedGroupCiphers
```

The set of group ciphers supported by this configuration. See `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.GroupCipher` for descriptions of the values. Defaults to CCMP TKIP WEP104 WEP40.

<br />

### allowedGroupManagementCiphers

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BitSet allowedGroupManagementCiphers
```

The set of group management ciphers supported by this configuration. See `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.GroupMgmtCipher` for descriptions of the values.

<br />

### allowedKeyManagement

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BitSet allowedKeyManagement
```

The set of key management protocols supported by this configuration. See `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.KeyMgmt` for descriptions of the values. Defaults to WPA-PSK WPA-EAP.

<br />

### allowedPairwiseCiphers

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BitSet allowedPairwiseCiphers
```

The set of pairwise ciphers for WPA supported by this configuration. See `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.PairwiseCipher` for descriptions of the values. Defaults to CCMP TKIP.

<br />

### allowedProtocols

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BitSet allowedProtocols
```

The set of security protocols supported by this configuration. See `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.Protocol` for descriptions of the values. Defaults to WPA RSN.

<br />

### allowedSuiteBCiphers

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BitSet allowedSuiteBCiphers
```

The set of SuiteB ciphers supported by this configuration. To be used for WPA3-Enterprise mode. Set automatically by the framework based on the certificate type that is used in this configuration.

<br />

### enterpriseConfig

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WifiEnterpriseConfig enterpriseConfig
```

The enterprise configuration details specifying the EAP method, certificates and other settings associated with the EAP.

<br />

### hiddenSSID

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hiddenSSID
```

This is a network that does not broadcast its SSID, so an SSID-specific probe request must be used for scans.

<br />

### isHomeProviderNetwork

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isHomeProviderNetwork
```

Flag indicating if this network is provided by a home Passpoint provider or a roaming Passpoint provider. This flag will be `true` if this network is provided by a home Passpoint provider and `false` if is provided by a roaming Passpoint provider or is a non-Passpoint network.

<br />

### networkId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int networkId
```

The ID number that the supplicant uses to identify this network configuration entry. This must be passed as an argument to most calls into the supplicant.

<br />

### preSharedKey

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String preSharedKey
```

Pre-shared key for use with WPA-PSK. Either an ASCII string enclosed in double quotation marks (e.g., `"abcdefghij"` for PSK passphrase or a string of 64 hex digits for raw PSK.

<br />

When the value of this key is read, the actual key is not returned, just a "\*" if the key has a value, or the null string otherwise.

<br />

<br />

### priority

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int priority
```

<br />

**This field was deprecated in API level 26.**   

This field does not exist anymore.

Priority determines the preference given to a network by `wpa_supplicant` when choosing an access point with which to associate.

<br />

### providerFriendlyName

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String providerFriendlyName
```

Name of Passpoint credential provider

<br />

### roamingConsortiumIds

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long[] roamingConsortiumIds
```

Roaming Consortium Id list for Passpoint credential; identifies a set of networks where Passpoint credential will be considered valid

<br />

### shared

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean shared
```

True if this network configuration is visible to and usable by other users on the same device, false otherwise.

<br />

### status

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int status
```

The current status of this network configuration entry.

<br />

**See also:**

- `https://developer.android.com/reference/android/net/wifi/WifiConfiguration.Status`

### wepKeys

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String[] wepKeys
```

<br />

**This field was deprecated in API level 28.**   

Due to security and performance limitations, use of WEP networks is discouraged.

Four WEP keys. For each of the four values, provide either an ASCII string enclosed in double quotation marks (e.g., `"abcdef"`) or a string of hex digits (e.g., `0102030405`).

<br />

When the value of one of these keys is read, the actual key is not returned, just a "\*" if the key has a value, or the null string otherwise.

<br />

<br />

### wepTxKeyIndex

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int wepTxKeyIndex
```

<br />

**This field was deprecated in API level 28.**   

Due to security and performance limitations, use of WEP networks is discouraged.

Default WEP key index, ranging from 0 to 3.

<br />

## Public constructors

### WifiConfiguration

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WifiConfiguration ()
```

<br />

<br />

### WifiConfiguration

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WifiConfiguration (WifiConfiguration source)
```

Copy constructor

<br />

| Parameters ||
|---|---|
| `source` | `WifiConfiguration`: This value cannot be `null`. <br /> |

## Public methods

### describeContents

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Implement the Parcelable interface

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### getHttpProxy

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ProxyInfo getHttpProxy ()
```

Returns the HTTP proxy used by this object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/ProxyInfo` | a `https://developer.android.com/reference/android/net/ProxyInfo` representing the proxy specified by this WifiConfiguration, or `null` if no proxy is specified. <br /> |

### getKey

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getKey ()
```

Return a String that can be used to uniquely identify this WifiConfiguration.   

Note: Do not persist this value! This value is not guaranteed to remain backwards compatible.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value cannot be `null`. <br /> |

### getMacRandomizationSetting

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMacRandomizationSetting ()
```

Get the MAC randomization setting for this network.

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_NONE` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_PERSISTENT` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_NON_PERSISTENT` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_AUTO` |

### getRandomizedMacAddress

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MacAddress getRandomizedMacAddress ()
```

Returns MAC address set to be the local randomized MAC address. Depending on user preference, the device may or may not use the returned MAC address for connections to this network.

Information is restricted to Device Owner, Profile Owner, and Carrier apps (which will only obtain addresses for configurations which they create). Other callers will receive a default "02:00:00:00:00:00" MAC address.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/MacAddress` | This value cannot be `null`. <br /> |

### isAllowedToUpdateByOtherUsers

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAllowedToUpdateByOtherUsers ()
```

Whether this wifi configuration is allowed to be updated by other users. Returns false for private (`shared` = false) configurations. Note: The admin user still can remove this configuration even if the network is not allowed to be updated by other users.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isDppConfigurator

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isDppConfigurator ()
```

To check if this WifiConfiguration supports configuring a peer Enrollee device with SECURITY_TYPE_DPP

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isPasspoint

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isPasspoint ()
```

Identify if this configuration represents a Passpoint network

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### setAllowedToUpdateByOtherUsers

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAllowedToUpdateByOtherUsers (boolean isAllowed)
```

Allows this network configuration to be updated by other users.

<br />

| Parameters ||
|---|---|
| `isAllowed` | `boolean` <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | when attempting to set a private (`shared` = false) configuration to true |

### setHttpProxy

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHttpProxy (ProxyInfo httpProxy)
```

Set the `https://developer.android.com/reference/android/net/ProxyInfo` for this WifiConfiguration. This method should only be used by a device owner or profile owner. When other apps attempt to save a `https://developer.android.com/reference/android/net/wifi/WifiConfiguration` with modified proxy settings, the methods `https://developer.android.com/reference/android/net/wifi/WifiManager#addNetwork(android.net.wifi.WifiConfiguration)` and `https://developer.android.com/reference/android/net/wifi/WifiManager#updateNetwork(android.net.wifi.WifiConfiguration)` fail and return `-1`.

<br />

| Parameters ||
|---|---|
| `httpProxy` | `ProxyInfo`: `https://developer.android.com/reference/android/net/ProxyInfo` representing the httpProxy to be used by this WifiConfiguration. Setting this to `null` will explicitly set no proxy, removing any proxy that was previously set. <br /> |

### setIpConfiguration

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIpConfiguration (IpConfiguration ipConfiguration)
```

Set the `https://developer.android.com/reference/android/net/IpConfiguration` for this network.

<br />

| Parameters ||
|---|---|
| `ipConfiguration` | `IpConfiguration`: a `https://developer.android.com/reference/android/net/IpConfiguration` to use for this Wi-Fi configuration, or `null` to use the default configuration. <br /> |

### setMacRandomizationSetting

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMacRandomizationSetting (int macRandomizationSetting)
```

Set the MAC randomization setting for this network.

Caller must satify one of the following conditions:

- Have `android.Manifest.permission#NETWORK_SETTINGS` permission.
- Have `android.Manifest.permission#NETWORK_SETUP_WIZARD` permission.
- Be in Demo Mode.
- Be the creator adding or updating a passpoint network.
- Be an admin updating their own network.

<br />

<br />

| Parameters ||
|---|---|
| `macRandomizationSetting` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_NONE` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_PERSISTENT` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_NON_PERSISTENT` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#RANDOMIZATION_AUTO` |

### setSecurityParams

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSecurityParams (int securityType)
```

Set the various security params to correspond to the provided security type. This is accomplished by setting the various BitSets exposed in WifiConfiguration.   

This API would clear existing security types and add a default one. Before calling this API with `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_DPP` as securityType, call `https://developer.android.com/reference/android/net/wifi/WifiManager#isEasyConnectDppAkmSupported()` to know whether this security type is supported or not.

<br />

| Parameters ||
|---|---|
| `securityType` | `int`: One of the following security types: `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_OPEN`, `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_WEP`, `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_PSK`, `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP`, `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_SAE`, `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_OWE`, `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_WAPI_PSK`, `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_WAPI_CERT`, `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE`, `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT`, `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_DPP`,. Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_OPEN` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_WEP` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_PSK` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_SAE` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_SUITE_B` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_OWE` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_WAPI_PSK` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_WAPI_CERT` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT` - `https://developer.android.com/reference/android/net/wifi/WifiConfiguration#SECURITY_TYPE_DPP` |

### toString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Implement the Parcelable interface

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |