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

# WifiP2pWfdInfo

*** ** * ** ***

` public final class WifiP2pWfdInfo `   
` 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.p2p.WifiP2pWfdInfo |

<br />

*** ** * ** ***

A class representing Wifi Display information for a device. See Wifi Display technical specification v1.0.0, section 5.1.2. See Wifi Display technical specification v2.0.0, section 5.1.12 for Wifi Display R2.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate audo is only supported at source. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate audio is not supported at primary sink. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_CONTENT_PROTECTION_SUPPORT` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate the support of Content Protection using the HDCP system 2.0/2.1. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicates that coupled sink is supporeted at sink. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicates that coupled sink is supported at source. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_DEVICE_TYPE_MASK` `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()` \& `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_DEVICE_TYPE_MASK` is one of `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SECONDARY_SINK` or `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK`. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate the preferred connectifity for Wifi Display. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_SESSION_AVAILABLE_MASK` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicates that Wifi Display session is available. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_TDLS_PERSISTENT_GROUP` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate that TDLS persistent group is intended. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate that the request is for re-invocation of TDLS persistent group. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate time synchronization using 802.1AS is supported. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT` Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicates that Wifi Display discovery is supported. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK` The device is a primary sink. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SECONDARY_SINK` The device is a secondary sink. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK` The device is dual-role capable i.e. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE` The device is a Wifi Display Source. |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#PREFERRED_CONNECTIVITY_P2P` Wifi Display (WFD) preferred connectivity is Wifi Direct (P2P). |
| `int` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#PREFERRED_CONNECTIVITY_TDLS` Wifi Display (WFD) preferred connectivity is TDLS. |

### 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 static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo>` | `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#CREATOR` Implement the Parcelable interface |

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

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#describeContents()() ` Implement the Parcelable interface |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getControlPort()() ` Returns the TCP port at which the WFD Device listens for RTSP messages. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()() ` Return R1 raw device info, See Wifi Display technical specification v1.0.0, section 5.1.2. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceType()() ` Get the type of the device. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getMaxThroughput()() ` Returns the maximum average throughput capability of the WFD Device, in megabits/second. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getR2DeviceInfo()() ` Return R2 raw device info, See Wifi Display technical specification v2.0.0, section 5.1.12. |
| ` int` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getR2DeviceType()() ` Get the type of the R2 device. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#isContentProtectionSupported()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#isCoupledSinkSupportedAtSink()() ` Returns true if Coupled Sink is supported by WFD Sink. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#isCoupledSinkSupportedAtSource()() ` Returns true if Coupled Sink is supported by WFD Source. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#isEnabled()() ` Returns true is Wifi Display is enabled, false otherwise. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#isR2Supported()() ` Returns true is Wifi Display R2 is enabled, false otherwise. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#isSessionAvailable()() ` Returns true if a session is available, false otherwise. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#setContentProtectionSupported(boolean)(boolean enabled) ` Sets whether Content Protection using the HDCP system 2.0/2.1 is supported. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#setControlPort(int)(int port) ` Sets the TCP port at which the WFD Device listens for RTSP messages. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#setCoupledSinkSupportAtSink(boolean)(boolean enabled) ` Sets whether Coupled Sink feature is supported by WFD Sink. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#setCoupledSinkSupportAtSource(boolean)(boolean enabled) ` Sets whether Coupled Sink feature is supported by WFD Source. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#setDeviceType(int)(int deviceType) ` Sets the type of the device. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#setEnabled(boolean)(boolean enabled) ` Sets whether Wifi Display should be enabled. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#setMaxThroughput(int)(int maxThroughput) ` Sets the maximum average throughput capability of the WFD Device, in megabits/second. |
| ` boolean` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#setR2DeviceType(int)(int deviceType) ` Sets the type of the Wifi Display R2 device. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#setSessionAvailable(boolean)(boolean enabled) ` Sets whether a session is available. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#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

### DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE

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

```
public static final int DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate audo is only supported at source. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 2048 (0x00000800)

### DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK

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

```
public static final int DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate audio is not supported at primary sink. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 1024 (0x00000400)

### DEVICE_INFO_CONTENT_PROTECTION_SUPPORT

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

```
public static final int DEVICE_INFO_CONTENT_PROTECTION_SUPPORT
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate the support of Content Protection using the HDCP system 2.0/2.1. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 256 (0x00000100)

### DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK

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

```
public static final int DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicates that coupled sink is supporeted at sink. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 8 (0x00000008)

### DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE

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

```
public static final int DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicates that coupled sink is supported at source. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 4 (0x00000004)

### DEVICE_INFO_DEVICE_TYPE_MASK

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

```
public static final int DEVICE_INFO_DEVICE_TYPE_MASK
```

`https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()` \& `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_DEVICE_TYPE_MASK` is one of `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SECONDARY_SINK` or `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK`. The bit definition is listed in 5.1.2 WFD Device Information Subelement and 5.1.12 WFD R2 Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 3 (0x00000003)

### DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK

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

```
public static final int DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate the preferred connectifity for Wifi Display. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification. The value is one of `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#PREFERRED_CONNECTIVITY_P2P` or `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#PREFERRED_CONNECTIVITY_TDLS`.

<br />

Constant Value: 128 (0x00000080)

### DEVICE_INFO_SESSION_AVAILABLE_MASK

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

```
public static final int DEVICE_INFO_SESSION_AVAILABLE_MASK
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicates that Wifi Display session is available. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 48 (0x00000030)

### DEVICE_INFO_TDLS_PERSISTENT_GROUP

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

```
public static final int DEVICE_INFO_TDLS_PERSISTENT_GROUP
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate that TDLS persistent group is intended. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 4096 (0x00001000)

### DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE

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

```
public static final int DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate that the request is for re-invocation of TDLS persistent group. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 8192 (0x00002000)

### DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT

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

```
public static final int DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicate time synchronization using 802.1AS is supported. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 512 (0x00000200)

### DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT

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

```
public static final int DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT
```

Bit field for `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#getDeviceInfo()`, indicates that Wifi Display discovery is supported. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.

<br />

Constant Value: 64 (0x00000040)

### DEVICE_TYPE_PRIMARY_SINK

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

```
public static final int DEVICE_TYPE_PRIMARY_SINK
```

The device is a primary sink.

<br />

Constant Value: 1 (0x00000001)

### DEVICE_TYPE_SECONDARY_SINK

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

```
public static final int DEVICE_TYPE_SECONDARY_SINK
```

The device is a secondary sink. This type is only supported by R1.

<br />

Constant Value: 2 (0x00000002)

### DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK

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

```
public static final int DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK
```

The device is dual-role capable i.e. either a WFD source or a primary sink.

<br />

Constant Value: 3 (0x00000003)

### DEVICE_TYPE_WFD_SOURCE

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

```
public static final int DEVICE_TYPE_WFD_SOURCE
```

The device is a Wifi Display Source.

<br />

Constant Value: 0 (0x00000000)

### PREFERRED_CONNECTIVITY_P2P

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

```
public static final int PREFERRED_CONNECTIVITY_P2P
```

Wifi Display (WFD) preferred connectivity is Wifi Direct (P2P).

<br />

Constant Value: 0 (0x00000000)

### PREFERRED_CONNECTIVITY_TDLS

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

```
public static final int PREFERRED_CONNECTIVITY_TDLS
```

Wifi Display (WFD) preferred connectivity is TDLS.

<br />

Constant Value: 1 (0x00000001)

## Fields

### CREATOR

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

```
public static final Creator<WifiP2pWfdInfo> CREATOR
```

Implement the Parcelable interface

<br />

## Public constructors

### WifiP2pWfdInfo

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

```
public WifiP2pWfdInfo ()
```

Default constructor.

<br />

### WifiP2pWfdInfo

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

```
public WifiP2pWfdInfo (WifiP2pWfdInfo source)
```

Copy constructor.

<br />

| Parameters ||
|---|---|
| `source` | `WifiP2pWfdInfo`: This value may be `null`. <br /> |

## Public methods

### describeContents

Added in [API level 30](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` |

### getControlPort

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

```
public int getControlPort ()
```

Returns the TCP port at which the WFD Device listens for RTSP messages.

<br />

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

### getDeviceInfo

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

```
public int getDeviceInfo ()
```

Return R1 raw device info, See Wifi Display technical specification v1.0.0, section 5.1.2. Access bit fields by DEVICE_INFO_\* constants.

<br />

| Returns ||
|---|---|
| `int` | Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_DEVICE_TYPE_MASK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_SESSION_AVAILABLE_MASK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_CONTENT_PROTECTION_SUPPORT` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_TDLS_PERSISTENT_GROUP` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE` |

### getDeviceType

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

```
public int getDeviceType ()
```

Get the type of the device. One of `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SECONDARY_SINK`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK`

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SECONDARY_SINK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK` |

### getMaxThroughput

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

```
public int getMaxThroughput ()
```

Returns the maximum average throughput capability of the WFD Device, in megabits/second.

<br />

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

### getR2DeviceInfo

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

```
public int getR2DeviceInfo ()
```

Return R2 raw device info, See Wifi Display technical specification v2.0.0, section 5.1.12. Access bit fields by `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_DEVICE_TYPE_MASK`.

<br />

| Returns ||
|---|---|
| `int` | Value is either `0` or - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_INFO_DEVICE_TYPE_MASK` |

### getR2DeviceType

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

```
public int getR2DeviceType ()
```

Get the type of the R2 device. One of `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK`, or `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK`

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SECONDARY_SINK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK` |

### isContentProtectionSupported

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

```
public boolean isContentProtectionSupported ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if Content Protection using the HDCP system 2.0/2.1 is supported. <br /> |

### isCoupledSinkSupportedAtSink

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

```
public boolean isCoupledSinkSupportedAtSink ()
```

Returns true if Coupled Sink is supported by WFD Sink. See Wifi Display technical specification v1.0.0, section 4.9.

<br />

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

### isCoupledSinkSupportedAtSource

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

```
public boolean isCoupledSinkSupportedAtSource ()
```

Returns true if Coupled Sink is supported by WFD Source. See Wifi Display technical specification v1.0.0, section 4.9.

<br />

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

### isEnabled

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

```
public boolean isEnabled ()
```

Returns true is Wifi Display is enabled, false otherwise.

<br />

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

### isR2Supported

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

```
public boolean isR2Supported ()
```

Returns true is Wifi Display R2 is enabled, false otherwise.

<br />

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

### isSessionAvailable

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

```
public boolean isSessionAvailable ()
```

Returns true if a session is available, false otherwise.

<br />

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

### setContentProtectionSupported

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

```
public void setContentProtectionSupported (boolean enabled)
```

Sets whether Content Protection using the HDCP system 2.0/2.1 is supported.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to indicate that Content Protection is supported, false otherwise. <br /> |

### setControlPort

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

```
public void setControlPort (int port)
```

Sets the TCP port at which the WFD Device listens for RTSP messages.

<br />

| Parameters ||
|---|---|
| `port` | `int`: Value is 0 or greater <br /> |

### setCoupledSinkSupportAtSink

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

```
public void setCoupledSinkSupportAtSink (boolean enabled)
```

Sets whether Coupled Sink feature is supported by WFD Sink. See Wifi Display technical specification v1.0.0, section 4.9.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to indicate support for coupled sink, false otherwise. <br /> |

### setCoupledSinkSupportAtSource

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

```
public void setCoupledSinkSupportAtSource (boolean enabled)
```

Sets whether Coupled Sink feature is supported by WFD Source. See Wifi Display technical specification v1.0.0, section 4.9.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to indicate support for coupled sink, false otherwise. <br /> |

### setDeviceType

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

```
public boolean setDeviceType (int deviceType)
```

Sets the type of the device.

<br />

| Parameters ||
|---|---|
| `deviceType` | `int`: One of `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SECONDARY_SINK`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK` Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SECONDARY_SINK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK` |

| Returns ||
|---|---|
| `boolean` | true if the device type was successfully set, false otherwise <br /> |

### setEnabled

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

```
public void setEnabled (boolean enabled)
```

Sets whether Wifi Display should be enabled.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to enable Wifi Display, false to disable <br /> |

### setMaxThroughput

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

```
public void setMaxThroughput (int maxThroughput)
```

Sets the maximum average throughput capability of the WFD Device, in megabits/second.

<br />

| Parameters ||
|---|---|
| `maxThroughput` | `int`: Value is 0 or greater <br /> |

### setR2DeviceType

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

```
public boolean setR2DeviceType (int deviceType)
```

Sets the type of the Wifi Display R2 device. See Wifi Display technical specification v2.0.0, section 5.1.12 for Wifi Display R2. Before calling this API, call `https://developer.android.com/` to know whether Wifi Display R2 is supported or not. If R2 info was filled without Wifi Display R2 support, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager#setWfdInfo(android.net.wifi.p2p.WifiP2pManager.Channel,%20android.net.wifi.p2p.WifiP2pWfdInfo,%20android.net.wifi.p2p.WifiP2pManager.ActionListener)` would fail.

<br />

| Parameters ||
|---|---|
| `deviceType` | `int`: One of `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK`, `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK` Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_WFD_SOURCE` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_PRIMARY_SINK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SECONDARY_SINK` - `https://developer.android.com/reference/android/net/wifi/p2p/WifiP2pWfdInfo#DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK` |

| Returns ||
|---|---|
| `boolean` | true if the device type was successfully set, false otherwise <br /> |

### setSessionAvailable

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

```
public void setSessionAvailable (boolean enabled)
```

Sets whether a session is available.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to indicate that a session is available, false otherwise. <br /> |

### toString

Added in [API level 30](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 30](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`: 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` |