# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Inherited Constants | Fields | Ctors | Methods | Inherited Methods

# WifiP2pWfdInfo

`public final class WifiP2pWfdInfo`
`extends Object` `implements Parcelable`

java.lang.Object
↳ | android.net.wifi.p2p.WifiP2pWfdInfo

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

### Inherited constants
From interface `android.os.Parcelable`
`int` | `CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` | `PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `writeToParcel(Parcel, int)`: 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 Creator<WifiP2pWfdInfo>` | `CREATOR` Implement the Parcelable interface

### Public constructors
`WifiP2pWfdInfo()` Default constructor.
`WifiP2pWfdInfo(WifiP2pWfdInfo source)` Copy constructor.

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

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.
From interface `android.os.Parcelable`
`abstract int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`abstract void` | `writeToParcel(Parcel dest, int flags)` Flatten this object in to a Parcel.

## Constants

### DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE

    public static final int DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE

Bit field for `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.

Constant Value: 2048 (0x00000800)

### DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK

    public static final int DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK

Bit field for `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.

Constant Value: 1024 (0x00000400)

### DEVICE_INFO_CONTENT_PROTECTION_SUPPORT

    public static final int DEVICE_INFO_CONTENT_PROTECTION_SUPPORT

Bit field for `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.

Constant Value: 256 (0x00000100)

### DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK

    public static final int DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK

Bit field for `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.

Constant Value: 8 (0x00000008)

### DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE

    public static final int DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE

Bit field for `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.

Constant Value: 4 (0x00000004)

### DEVICE_INFO_DEVICE_TYPE_MASK

    public static final int DEVICE_INFO_DEVICE_TYPE_MASK

`getDeviceInfo()` & `DEVICE_INFO_DEVICE_TYPE_MASK` is one of `DEVICE_TYPE_WFD_SOURCE`, `DEVICE_TYPE_PRIMARY_SINK`, `DEVICE_TYPE_SECONDARY_SINK` or `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.

Constant Value: 3 (0x00000003)

### DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK

    public static final int DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK

Bit field for `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 `PREFERRED_CONNECTIVITY_P2P` or `PREFERRED_CONNECTIVITY_TDLS`.

Constant Value: 128 (0x00000080)

### DEVICE_INFO_SESSION_AVAILABLE_MASK

    public static final int DEVICE_INFO_SESSION_AVAILABLE_MASK

Bit field for `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.

Constant Value: 48 (0x00000030)

### DEVICE_INFO_TDLS_PERSISTENT_GROUP

    public static final int DEVICE_INFO_TDLS_PERSISTENT_GROUP

Bit field for `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.

Constant Value: 4096 (0x00001000)

### DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE

    public static final int DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE

Bit field for `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.

Constant Value: 8192 (0x00002000)

### DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT

    public static final int DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT

Bit field for `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.

Constant Value: 512 (0x00000200)

### DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT

    public static final int DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT

Bit field for `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.

Constant Value: 64 (0x00000040)

### DEVICE_TYPE_PRIMARY_SINK

    public static final int DEVICE_TYPE_PRIMARY_SINK

The device is a primary sink.

Constant Value: 1 (0x00000001)

### DEVICE_TYPE_SECONDARY_SINK

    public static final int DEVICE_TYPE_SECONDARY_SINK

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

Constant Value: 2 (0x00000002)

### DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK

    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.

Constant Value: 3 (0x00000003)

### DEVICE_TYPE_WFD_SOURCE

    public static final int DEVICE_TYPE_WFD_SOURCE

The device is a Wifi Display Source.

Constant Value: 0 (0x00000000)

### PREFERRED_CONNECTIVITY_P2P

    public static final int PREFERRED_CONNECTIVITY_P2P

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

Constant Value: 0 (0x00000000)

### PREFERRED_CONNECTIVITY_TDLS

    public static final int PREFERRED_CONNECTIVITY_TDLS

Wifi Display (WFD) preferred connectivity is TDLS.

Constant Value: 1 (0x00000001)

## Fields

### CREATOR

    public static final Creator<WifiP2pWfdInfo> CREATOR

Implement the Parcelable interface

## Public constructors

### WifiP2pWfdInfo

    public WifiP2pWfdInfo ()

Default constructor.

### WifiP2pWfdInfo

    public WifiP2pWfdInfo (WifiP2pWfdInfo source)

Copy constructor.

Parameters
`source` | `WifiP2pWfdInfo`: This value may be `null`.

## Public methods

### describeContents

    public int describeContents ()

Implement the Parcelable interface

Returns
`int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or `CONTENTS_FILE_DESCRIPTOR`

### getControlPort

    public int getControlPort ()

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

Returns
`int` |

### getDeviceInfo

    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.

Returns
`int` | Value is either `0` or a combination of `DEVICE_INFO_DEVICE_TYPE_MASK`, `DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE`, `DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK`, `DEVICE_INFO_SESSION_AVAILABLE_MASK`, `DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT`, `DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK`, `DEVICE_INFO_CONTENT_PROTECTION_SUPPORT`, `DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT`, `DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK`, `DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE`, `DEVICE_INFO_TDLS_PERSISTENT_GROUP`, and `DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE`

### getDeviceType

    public int getDeviceType ()

Get the type of the device. One of `DEVICE_TYPE_WFD_SOURCE`, `DEVICE_TYPE_PRIMARY_SINK`, `DEVICE_TYPE_SECONDARY_SINK`, `DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK`

Returns
`int` | Value is `DEVICE_TYPE_WFD_SOURCE`, `DEVICE_TYPE_PRIMARY_SINK`, `DEVICE_TYPE_SECONDARY_SINK`, or `DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK`

### getMaxThroughput

    public int getMaxThroughput ()

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

Returns
`int` |

### getR2DeviceInfo

    public int getR2DeviceInfo ()

Return R2 raw device info, See Wifi Display technical specification v2.0.0, section 5.1.12. Access bit fields by `DEVICE_INFO_DEVICE_TYPE_MASK`.

Returns
`int` | Value is either `0` or `DEVICE_INFO_DEVICE_TYPE_MASK`

### getR2DeviceType

    public int getR2DeviceType ()

Get the type of the R2 device. One of `DEVICE_TYPE_WFD_SOURCE`, `DEVICE_TYPE_PRIMARY_SINK`, or `DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK`

Returns
`int` | Value is `DEVICE_TYPE_WFD_SOURCE`, `DEVICE_TYPE_PRIMARY_SINK`, `DEVICE_TYPE_SECONDARY_SINK`, or `DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK`

### isContentProtectionSupported

    public boolean isContentProtectionSupported ()

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

### isCoupledSinkSupportedAtSink

    public boolean isCoupledSinkSupportedAtSink ()

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

Returns
`boolean` |

### isCoupledSinkSupportedAtSource

    public boolean isCoupledSinkSupportedAtSource ()

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

Returns
`boolean` |

### isEnabled

    public boolean isEnabled ()

Returns true is Wifi Display is enabled, false otherwise.

Returns
`boolean` |

### isR2Supported

    public boolean isR2Supported ()

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

Returns
`boolean` |

### isSessionAvailable

    public boolean isSessionAvailable ()

Returns true if a session is available, false otherwise.

Returns
`boolean` |

### setContentProtectionSupported

    public void setContentProtectionSupported (boolean enabled)

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

Parameters
`enabled` | `boolean`: true to indicate that Content Protection is supported, false otherwise.

### setControlPort

    public void setControlPort (int port)

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

Parameters
`port` | `int`: Value is 0 or greater

### setCoupledSinkSupportAtSink

    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.

Parameters
`enabled` | `boolean`: true to indicate support for coupled sink, false otherwise.

### setCoupledSinkSupportAtSource

    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.

Parameters
`enabled` | `boolean`: true to indicate support for coupled sink, false otherwise.

### setDeviceType

    public boolean setDeviceType (int deviceType)

Sets the type of the device.

Parameters
`deviceType` | `int`: One of `DEVICE_TYPE_WFD_SOURCE`, `DEVICE_TYPE_PRIMARY_SINK`, `DEVICE_TYPE_SECONDARY_SINK`, `DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK` Value is `DEVICE_TYPE_WFD_SOURCE`, `DEVICE_TYPE_PRIMARY_SINK`, `DEVICE_TYPE_SECONDARY_SINK`, or `DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK`

Returns
`boolean` | true if the device type was successfully set, false otherwise

### setEnabled

    public void setEnabled (boolean enabled)

Sets whether Wifi Display should be enabled.

Parameters
`enabled` | `boolean`: true to enable Wifi Display, false to disable

### setMaxThroughput

    public void setMaxThroughput (int maxThroughput)

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

Parameters
`maxThroughput` | `int`: Value is 0 or greater

### setR2DeviceType

    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 {@link WifiManager#isWifiDisplayR2Supported() to know whether Wifi Display R2 is supported or not. If R2 info was filled without Wifi Display R2 support, {@link WifiP2pManager#setWfdInfo(Channel, WifiP2pWfdInfo, ActionListener) would fail.

Parameters
`deviceType` | `int`: One of `DEVICE_TYPE_WFD_SOURCE`, `DEVICE_TYPE_PRIMARY_SINK`, `DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK`

Returns
`boolean` | true if the device type was successfully set, false otherwise

### setSessionAvailable

    public void setSessionAvailable (boolean enabled)

Sets whether a session is available.

Parameters
`enabled` | `boolean`: true to indicate that a session is available, false otherwise.

### toString

    public String toString ()

Returns a string representation of the object. In general, the `toString` method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The `toString` method for class `Object` returns a string consisting of the name of the class of which the object is an instance, the at-sign character ``@`', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

>      getClass().getName() + '@' + Integer.toHexString(hashCode())

Returns
`String` | a string representation of the object.

### writeToParcel

    public void writeToParcel (Parcel dest,
                    int flags)

Implement the Parcelable interface

Parameters
`dest` | `Parcel`: This value cannot be `null`.
`flags` | `int`: Additional flags about how the object should be written. May be 0 or `Parcelable.PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of `Parcelable.PARCELABLE_WRITE_RETURN_VALUE`, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*