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/WifiInfo#nestedclasses) \| [Constants](https://developer.android.com/reference/android/net/wifi/WifiInfo#constants) \| [Inherited Constants](https://developer.android.com/reference/android/net/wifi/WifiInfo#inhconstants) \| [Methods](https://developer.android.com/reference/android/net/wifi/WifiInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/net/wifi/WifiInfo#inhmethods)

# WifiInfo

*** ** * ** ***

` public class WifiInfo `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/os/Parcelable, https://developer.android.com/reference/android/net/TransportInfo `

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

<br />

*** ** * ** ***

Describes the state of any Wi-Fi connection that is active or is in the process of being set up. In the connected state, access to location sensitive fields requires the same permissions as `https://developer.android.com/reference/android/net/wifi/WifiManager#getScanResults()`. If such access is not allowed, `https://developer.android.com/reference/android/net/wifi/WifiInfo#getSSID()` will return `https://developer.android.com/reference/android/net/wifi/WifiManager#UNKNOWN_SSID` and `https://developer.android.com/reference/android/net/wifi/WifiInfo#getBSSID()` will return `"02:00:00:00:00:00"`. `https://developer.android.com/reference/android/net/wifi/WifiInfo#getApMldMacAddress()` will return null. `https://developer.android.com/reference/android/net/wifi/WifiInfo#getNetworkId()` will return `-1`. `https://developer.android.com/reference/android/net/wifi/WifiInfo#getPasspointFqdn()` will return null. `https://developer.android.com/reference/android/net/wifi/WifiInfo#getPasspointProviderFriendlyName()` will return null. `https://developer.android.com/reference/android/net/wifi/WifiInfo#getInformationElements()` will return null. `https://developer.android.com/reference/android/net/wifi/WifiInfo#getMacAddress()` will return `"02:00:00:00:00:00"`.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/net/wifi/WifiInfo.Builder` Builder for WifiInfo |

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#FREQUENCY_UNITS` Frequency in MHz |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNITS` The unit in which links speeds are expressed. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNKNOWN` Constant for unknown link speed. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_DPP` Security type for Easy Connect (DPP) network |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_EAP` Security type for an EAP network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_EAP_WPA3_ENTERPRISE` Security type for a WPA3-Enterprise network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#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/WifiInfo#SECURITY_TYPE_OPEN` Security type for an open network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_OSEN` Security type for an OSEN network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_OWE` Security type for an OWE network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_PASSPOINT_R1_R2` Security type for a Passpoint R1/R2 network, where TKIP and WEP are not allowed. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_PASSPOINT_R3` Security type for a Passpoint R3 network, where TKIP and WEP are not allowed, and PMF must be set to Required. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_PSK` Security type for a PSK network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_SAE` Security type for an SAE network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_UNKNOWN` Unknown security type. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_WAPI_CERT` Security type for a WAPI Certificate network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_WAPI_PSK` Security type for a WAPI PSK network. |
| `int` | `https://developer.android.com/reference/android/net/wifi/WifiInfo#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)`".

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#describeContents()() ` Implement the Parcelable interface |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object that) ` Indicates whether some other object is "equal to" this one. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/wifi/MloLink>` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getAffiliatedMloLinks()() ` Return the Multi-Link Operation (MLO) affiliated Links for Wi-Fi 7 access points. |
| ` https://developer.android.com/reference/android/net/MacAddress` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getApMldMacAddress()() ` Return the Multi-Link Device (MLD) MAC Address for the connected access point. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getApMloLinkId()() ` Return the access point Multi-Link Operation (MLO) link-id for Wi-Fi 7 access points. |
| ` long` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getApplicableRedactions()() ` Returns a bitmask of all the applicable redactions (based on the permissions held by the receiving app) to be performed on this TransportInfo. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/wifi/MloLink>` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getAssociatedMloLinks()() ` Return the associated Multi-Link Operation (MLO) Links for Wi-Fi 7 access points. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getBSSID()() ` Return the basic service set identifier (BSSID) of the current access point. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getCurrentSecurityType()() ` Returns the security type of the current 802.11 network connection. |
| ` static https://developer.android.com/reference/android/net/NetworkInfo.DetailedState` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getDetailedStateOf(android.net.wifi.SupplicantState)(https://developer.android.com/reference/android/net/wifi/SupplicantState suppState) ` Map a supplicant state into a fine-grained network connectivity state. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getFrequency()() ` Returns the current frequency in `https://developer.android.com/reference/android/net/wifi/WifiInfo#FREQUENCY_UNITS`. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getHiddenSSID()() ` |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/wifi/ScanResult.InformationElement>` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getInformationElements()() ` Get all information elements found in the beacon of the connected bssid. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getIpAddress()() ` *This method was deprecated in API level 31. Use the methods on `https://developer.android.com/reference/android/net/LinkProperties` which can be obtained either via `https://developer.android.com/reference/android/net/ConnectivityManager.NetworkCallback#onLinkPropertiesChanged(android.net.Network,%20android.net.LinkProperties)` or `https://developer.android.com/reference/android/net/ConnectivityManager#getLinkProperties(android.net.Network)`.* |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getLinkSpeed()() ` Returns the current link speed in `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNITS`. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getMacAddress()() ` Returns the MAC address used for this connection. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getMaxSupportedRxLinkSpeedMbps()() ` Returns the maximum supported receive link speed in Mbps |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getMaxSupportedTxLinkSpeedMbps()() ` Returns the maximum supported transmit link speed in Mbps |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getNetworkId()() ` Each configured network has a unique small integer ID, used to identify the network. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getPasspointFqdn()() ` Returns the Fully Qualified Domain Name of the network if it is a Passpoint network. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getPasspointProviderFriendlyName()() ` Returns the Provider Friendly Name of the network if it is a Passpoint network. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getPasspointUniqueId()() ` Get the Passpoint unique identifier for the current connection |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getRssi()() ` Returns the received signal strength indicator of the current 802.11 network, in dBm. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getRxLinkSpeedMbps()() ` Returns the current receive link speed in Mbps. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getSSID()() ` Returns the service set identifier (SSID) of the current 802.11 network. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getSubscriptionId()() ` If this network is provisioned by a carrier, returns subscription Id corresponding to the associated SIM on the device. |
| ` https://developer.android.com/reference/android/net/wifi/SupplicantState` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getSupplicantState()() ` Return the detailed state of the supplicant's negotiation with an access point, in the form of a `https://developer.android.com/reference/android/net/wifi/SupplicantState` object. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getTxLinkSpeedMbps()() ` Returns the current transmit link speed in Mbps. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#getWifiStandard()() ` Get connection Wi-Fi standard |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#isRestricted()() ` Returns true if the current Wifi network is a restricted network, false otherwise. |
| ` https://developer.android.com/reference/android/net/wifi/WifiInfo` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#makeCopy(long)(long redactions) ` Create a copy of a `https://developer.android.com/reference/android/net/wifi/WifiInfo` with some fields redacted based on the permissions held by the receiving app. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/WifiInfo#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

### FREQUENCY_UNITS

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

```
public static final String FREQUENCY_UNITS
```

Frequency in MHz

<br />

Constant Value: "MHz"

### LINK_SPEED_UNITS

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

```
public static final String LINK_SPEED_UNITS
```

The unit in which links speeds are expressed.

<br />

Constant Value: "Mbps"

### LINK_SPEED_UNKNOWN

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

```
public static final int LINK_SPEED_UNKNOWN
```

Constant for unknown link speed.

<br />

Constant Value: -1 (0xffffffff)

### 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 31](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_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.

<br />

Constant Value: 5 (0x00000005)

### SECURITY_TYPE_OPEN

Added in [API level 31](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_OSEN

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

```
public static final int SECURITY_TYPE_OSEN
```

Security type for an OSEN network.

<br />

Constant Value: 10 (0x0000000a)

### SECURITY_TYPE_OWE

Added in [API level 31](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_PASSPOINT_R1_R2

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

```
public static final int SECURITY_TYPE_PASSPOINT_R1_R2
```

Security type for a Passpoint R1/R2 network, where TKIP and WEP are not allowed.

<br />

Constant Value: 11 (0x0000000b)

### SECURITY_TYPE_PASSPOINT_R3

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

```
public static final int SECURITY_TYPE_PASSPOINT_R3
```

Security type for a Passpoint R3 network, where TKIP and WEP are not allowed, and PMF must be set to Required.

<br />

Constant Value: 12 (0x0000000c)

### SECURITY_TYPE_PSK

Added in [API level 31](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 31](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_UNKNOWN

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

```
public static final int SECURITY_TYPE_UNKNOWN
```

Unknown security type.

<br />

Constant Value: -1 (0xffffffff)

### SECURITY_TYPE_WAPI_CERT

Added in [API level 31](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 31](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 31](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)

## 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` |

### equals

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

```
public boolean equals (Object that)
```

Indicates whether some other object is "equal to" this one.

The `equals` method implements an equivalence relation on non-null object references:

- It is *reflexive*: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.

An equivalence relation partitions the elements it operates on into *equivalence classes*; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

<br />

| Parameters ||
|---|---|
| `that` | `Object`: the reference object with which to compare. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getAffiliatedMloLinks

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

```
public List<MloLink> getAffiliatedMloLinks ()
```

Return the Multi-Link Operation (MLO) affiliated Links for Wi-Fi 7 access points. i.e. when `https://developer.android.com/reference/android/net/wifi/WifiInfo#getWifiStandard()` returns `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_11BE`. Affiliated links are the links supported by the Access Point Multi Link Device (AP MLD). The Station Multi Link Device (STA MLD) gathers affiliated link information from scan results. Depending on Station's capability, it associates to all or a subset of affiliated links.

**Note:** `https://developer.android.com/reference/android/net/wifi/WifiInfo#getAssociatedMloLinks()` returns associated links.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/wifi/MloLink>` | List of affiliated MLO links, or an empty list if access point is not Wi-Fi 7. This value cannot be `null`. <br /> |

### getApMldMacAddress

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

```
public MacAddress getApMldMacAddress ()
```

Return the Multi-Link Device (MLD) MAC Address for the connected access point.

The returned MLD MAC Address will be `null` in the following cases: There is no network currently connected The connected access point is not an MLD access point, i.e. `https://developer.android.com/reference/android/net/wifi/WifiInfo#getWifiStandard()` returns `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_11BE`. The caller has insufficient permissions to access the access point MLD MAC Address.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/MacAddress` | the MLD Mac address <br /> |

### getApMloLinkId

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

```
public int getApMloLinkId ()
```

Return the access point Multi-Link Operation (MLO) link-id for Wi-Fi 7 access points. i.e. `https://developer.android.com/reference/android/net/wifi/WifiInfo#getWifiStandard()` returns `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_11BE`, otherwise return `https://developer.android.com/reference/android/net/wifi/MloLink#INVALID_MLO_LINK_ID`. Valid values are 0-15 as described in IEEE 802.11be Specification, section 9.4.2.295b.2.

<br />

| Returns ||
|---|---|
| `int` | `https://developer.android.com/reference/android/net/wifi/MloLink#INVALID_MLO_LINK_ID` or a valid value (0-15). Value is between `https://developer.android.com/reference/android/net/wifi/MloLink#INVALID_MLO_LINK_ID` and `https://developer.android.com/` inclusive <br /> |

### getApplicableRedactions

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

```
public long getApplicableRedactions ()
```

Returns a bitmask of all the applicable redactions (based on the permissions held by the receiving app) to be performed on this TransportInfo.

<br />

| Returns ||
|---|---|
| `long` | bitmask of redactions applicable on this instance. <br /> |

### getAssociatedMloLinks

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

```
public List<MloLink> getAssociatedMloLinks ()
```

Return the associated Multi-Link Operation (MLO) Links for Wi-Fi 7 access points. i.e. when `https://developer.android.com/reference/android/net/wifi/WifiInfo#getWifiStandard()` returns `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_11BE`. Affiliated links are the links supported by the Access Point Multi Link Device (AP MLD). The Station Multi Link Device (STA MLD) gathers affiliated link information from scan results. Depending on Station's capability, it associates to all or a subset of affiliated links.

**Note:** `https://developer.android.com/reference/android/net/wifi/WifiInfo#getAffiliatedMloLinks()` returns affiliated links.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/wifi/MloLink>` | List of associated MLO links, or an empty list if access point is not a multi-link device. This value cannot be `null`. <br /> |

### getBSSID

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

```
public String getBSSID ()
```

Return the basic service set identifier (BSSID) of the current access point. In case of Multi Link Operation (MLO), the BSSID corresponds to the BSSID of the link used for association.

The BSSID may be `null`, if there is no network currently connected. `"02:00:00:00:00:00"`, if the caller has insufficient permissions to access the BSSID.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the BSSID, in the form of a six-byte MAC address: `XX:XX:XX:XX:XX:XX` <br /> |

### getCurrentSecurityType

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

```
public int getCurrentSecurityType ()
```

Returns the security type of the current 802.11 network connection.

<br />

| Returns ||
|---|---|
| `int` | the security type, or `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_UNKNOWN` if not currently connected. Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_UNKNOWN` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_OPEN` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_WEP` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_PSK` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_EAP` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_SAE` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_OWE` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_WAPI_PSK` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_WAPI_CERT` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_EAP_WPA3_ENTERPRISE` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_PASSPOINT_R1_R2` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_PASSPOINT_R3` - `https://developer.android.com/reference/android/net/wifi/WifiInfo#SECURITY_TYPE_DPP` |

### getDetailedStateOf

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

```
public static NetworkInfo.DetailedState getDetailedStateOf (SupplicantState suppState)
```

Map a supplicant state into a fine-grained network connectivity state.

<br />

| Parameters ||
|---|---|
| `suppState` | `SupplicantState`: the supplicant state <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/NetworkInfo.DetailedState` | the corresponding `https://developer.android.com/reference/android/net/NetworkInfo.DetailedState` <br /> |

### getFrequency

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

```
public int getFrequency ()
```

Returns the current frequency in `https://developer.android.com/reference/android/net/wifi/WifiInfo#FREQUENCY_UNITS`. In case of Multi Link Operation (MLO), returned value is the frequency of the associated link with the highest RSSI.

<br />

| Returns ||
|---|---|
| `int` | the frequency. <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/wifi/WifiInfo#FREQUENCY_UNITS`

### getHiddenSSID

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

```
public boolean getHiddenSSID ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | `true` if this network does not broadcast its SSID, so an SSID-specific probe request must be used for scans. <br /> |

### getInformationElements

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

```
public List<ScanResult.InformationElement> getInformationElements ()
```

Get all information elements found in the beacon of the connected bssid.

The information elements will be `null` if there is no network currently connected or if the caller has insufficient permissions to access the info elements.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/wifi/ScanResult.InformationElement>` | List of information elements `https://developer.android.com/reference/android/net/wifi/ScanResult.InformationElement` or null. <br /> |

### getIpAddress

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

```
public int getIpAddress ()
```

<br />

**This method was deprecated in API level 31.**   

Use the methods on `https://developer.android.com/reference/android/net/LinkProperties` which can be obtained either via `https://developer.android.com/reference/android/net/ConnectivityManager.NetworkCallback#onLinkPropertiesChanged(android.net.Network,%20android.net.LinkProperties)` or `https://developer.android.com/reference/android/net/ConnectivityManager#getLinkProperties(android.net.Network)`.

<br />

<br />

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

### getLinkSpeed

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

```
public int getLinkSpeed ()
```

Returns the current link speed in `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNITS`. In case of Multi Link Operation (MLO), returned value is the current link speed of the associated link with the highest RSSI.

<br />

| Returns ||
|---|---|
| `int` | the link speed or `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNKNOWN` if link speed is unknown. <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNITS`
- `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNKNOWN`

### getMacAddress

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

```
public String getMacAddress ()
```

Returns the MAC address used for this connection. In case of Multi Link Operation (MLO), returned value is the Station MLD MAC address.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | MAC address of the connection or `"02:00:00:00:00:00"` if the caller has insufficient permission. Requires `android.Manifest.permission#LOCAL_MAC_ADDRESS` and `https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION`. <br /> |

### getMaxSupportedRxLinkSpeedMbps

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

```
public int getMaxSupportedRxLinkSpeedMbps ()
```

Returns the maximum supported receive link speed in Mbps

<br />

| Returns ||
|---|---|
| `int` | the max supported Rx link speed or `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNKNOWN` if link speed is unknown. @see #LINK_SPEED_UNKNOWN <br /> |

### getMaxSupportedTxLinkSpeedMbps

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

```
public int getMaxSupportedTxLinkSpeedMbps ()
```

Returns the maximum supported transmit link speed in Mbps

<br />

| Returns ||
|---|---|
| `int` | the max supported tx link speed or `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNKNOWN` if link speed is unknown. @see #LINK_SPEED_UNKNOWN <br /> |

### getNetworkId

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

```
public int getNetworkId ()
```

Each configured network has a unique small integer ID, used to identify the network. This method returns the ID for the currently connected network.

The networkId may be `-1` if there is no currently connected network or if the caller has insufficient permissions to access the network ID.

<br />

<br />

| Returns ||
|---|---|
| `int` | the network ID. <br /> |

### getPasspointFqdn

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

```
public String getPasspointFqdn ()
```

Returns the Fully Qualified Domain Name of the network if it is a Passpoint network.

The FQDN may be `null` if no network currently connected, currently connected network is not passpoint network or the caller has insufficient permissions to access the FQDN.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getPasspointProviderFriendlyName

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

```
public String getPasspointProviderFriendlyName ()
```

Returns the Provider Friendly Name of the network if it is a Passpoint network.

The Provider Friendly Name may be `null` if no network currently connected, currently connected network is not passpoint network or the caller has insufficient permissions to access the Provider Friendly Name.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getPasspointUniqueId

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

```
public String getPasspointUniqueId ()
```

Get the Passpoint unique identifier for the current connection

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | Passpoint unique identifier, or null if this connection is not Passpoint. <br /> |

### getRssi

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

```
public int getRssi ()
```

Returns the received signal strength indicator of the current 802.11 network, in dBm. In case of Multi Link Operation (MLO), returned RSSI is the highest of all associated links.

Use `https://developer.android.com/reference/android/net/wifi/WifiManager#calculateSignalLevel(int)` to convert this number into an absolute signal level which can be displayed to a user.

<br />

<br />

| Returns ||
|---|---|
| `int` | the RSSI. <br /> |

### getRxLinkSpeedMbps

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

```
public int getRxLinkSpeedMbps ()
```

Returns the current receive link speed in Mbps. In case of Multi Link Operation (MLO), returned value is the receive link speed of the associated link with the highest RSSI.

<br />

| Returns ||
|---|---|
| `int` | the Rx link speed or `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNKNOWN` if link speed is unknown. Value is -1 or greater <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNKNOWN`

### getSSID

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

```
public String getSSID ()
```

Returns the service set identifier (SSID) of the current 802.11 network.

If the SSID can be decoded as UTF-8, it will be returned surrounded by double quotation marks. Otherwise, it is returned as a string of hex digits. The SSID may be `https://developer.android.com/reference/android/net/wifi/WifiManager#UNKNOWN_SSID`, if there is no network currently connected or if the caller has insufficient permissions to access the SSID.

Prior to `https://developer.android.com/reference/android/os/Build.VERSION_CODES#JELLY_BEAN_MR1`, this method always returned the SSID with no quotes around it.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the SSID. <br /> |

### getSubscriptionId

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

```
public int getSubscriptionId ()
```

If this network is provisioned by a carrier, returns subscription Id corresponding to the associated SIM on the device. If this network is not provisioned by a carrier, returns `https://developer.android.com/reference/android/telephony/SubscriptionManager#INVALID_SUBSCRIPTION_ID`

<br />

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

**See also:**

- `https://developer.android.com/reference/android/net/wifi/WifiNetworkSuggestion.Builder#setSubscriptionId(int)`
- `https://developer.android.com/reference/android/telephony/SubscriptionInfo#getSubscriptionId()`

### getSupplicantState

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

```
public SupplicantState getSupplicantState ()
```

Return the detailed state of the supplicant's negotiation with an access point, in the form of a `https://developer.android.com/reference/android/net/wifi/SupplicantState` object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/wifi/SupplicantState` | the current `https://developer.android.com/reference/android/net/wifi/SupplicantState` <br /> |

### getTxLinkSpeedMbps

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

```
public int getTxLinkSpeedMbps ()
```

Returns the current transmit link speed in Mbps. In case of Multi Link Operation (MLO), returned value is the current transmit link speed of the associated link with the highest RSSI.

<br />

| Returns ||
|---|---|
| `int` | the Tx link speed or `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNKNOWN` if link speed is unknown. Value is -1 or greater <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/wifi/WifiInfo#LINK_SPEED_UNKNOWN`

### getWifiStandard

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

```
public int getWifiStandard ()
```

Get connection Wi-Fi standard

<br />

| Returns ||
|---|---|
| `int` | the connection Wi-Fi standard. Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_UNKNOWN` - `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_LEGACY` - `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_11N` - `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_11AC` - `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_11AX` - `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_11AD` - `https://developer.android.com/reference/android/net/wifi/ScanResult#WIFI_STANDARD_11BE` |

### hashCode

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

```
public int hashCode ()
```

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by `https://developer.android.com/reference/java/util/HashMap`.

The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### isRestricted

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

```
public boolean isRestricted ()
```

Returns true if the current Wifi network is a restricted network, false otherwise. A restricted network has its `https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_NOT_RESTRICTED` capability removed.

<br />

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

**See also:**

- `https://developer.android.com/reference/android/net/wifi/WifiNetworkSuggestion.Builder#setRestricted(boolean)`

### makeCopy

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

```
public WifiInfo makeCopy (long redactions)
```

Create a copy of a `https://developer.android.com/reference/android/net/wifi/WifiInfo` with some fields redacted based on the permissions held by the receiving app.

<br />

| Parameters ||
|---|---|
| `redactions` | `long`: bitmask of redactions that needs to be performed on this instance. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/wifi/WifiInfo` | Copy of this instance with the necessary redactions. This value cannot be `null`. <br /> |

### 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` |