Added in API level 30

WifiP2pWfdInfo

class WifiP2pWfdInfo : Parcelable
kotlin.Any
   ↳ 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
static Int

Bit field for getDeviceInfo(), indicate audo is only supported at source.

static Int

Bit field for getDeviceInfo(), indicate audio is not supported at primary sink.

static Int

Bit field for getDeviceInfo(), indicate the support of Content Protection using the HDCP system 2.

static Int

Bit field for getDeviceInfo(), indicates that coupled sink is supporeted at sink.

static Int

Bit field for getDeviceInfo(), indicates that coupled sink is supported at source.

static Int

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.

static Int

Bit field for getDeviceInfo(), indicate the preferred connectifity for Wifi Display.

static Int

Bit field for getDeviceInfo(), indicates that Wifi Display session is available.

static Int

Bit field for getDeviceInfo(), indicate that TDLS persistent group is intended.

static Int

Bit field for getDeviceInfo(), indicate that the request is for re-invocation of TDLS persistent group.

static Int

Bit field for getDeviceInfo(), indicate time synchronization using 802.

static Int

Bit field for getDeviceInfo(), indicates that Wifi Display discovery is supported.

static Int

The device is a primary sink.

static Int

The device is a secondary sink.

static Int

The device is dual-role capable i.

static Int

The device is a Wifi Display Source.

static Int

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

static Int

Wifi Display (WFD) preferred connectivity is TDLS.

Inherited constants
Public constructors

Default constructor.

Copy constructor.

Public methods
Int

Implement the Parcelable interface

Int

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

Int

Return R1 raw device info, See Wifi Display technical specification v1.

Int

Get the type of the device.

Int

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

Int

Return R2 raw device info, See Wifi Display technical specification v2.

Int

Get the type of the R2 device.

Boolean

Boolean

Returns true if Coupled Sink is supported by WFD Sink.

Boolean

Returns true if Coupled Sink is supported by WFD Source.

Boolean

Returns true is Wifi Display is enabled, false otherwise.

Boolean

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

Boolean

Returns true if a session is available, false otherwise.

Unit

Sets whether Content Protection using the HDCP system 2.

Unit

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

Unit

Sets whether Coupled Sink feature is supported by WFD Sink.

Unit

Sets whether Coupled Sink feature is supported by WFD Source.

Boolean
setDeviceType(deviceType: Int)

Sets the type of the device.

Unit
setEnabled(enabled: Boolean)

Sets whether Wifi Display should be enabled.

Unit
setMaxThroughput(maxThroughput: Int)

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

Boolean
setR2DeviceType(deviceType: Int)

Sets the type of the Wifi Display R2 device.

Unit

Sets whether a session is available.

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Implement the Parcelable interface

Properties
static Parcelable.Creator<WifiP2pWfdInfo!>

Implement the Parcelable interface

Constants

DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE

Added in API level 31
static val DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE: Int

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.

Value: 2048

DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK

Added in API level 31
static val DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK: Int

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.

Value: 1024

DEVICE_INFO_CONTENT_PROTECTION_SUPPORT

Added in API level 31
static val DEVICE_INFO_CONTENT_PROTECTION_SUPPORT: Int

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.

Value: 256

DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK

Added in API level 31
static val DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK: Int

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.

Value: 8

DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE

Added in API level 31
static val DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE: Int

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.

Value: 4

DEVICE_INFO_DEVICE_TYPE_MASK

Added in API level 31
static val DEVICE_INFO_DEVICE_TYPE_MASK: Int

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.

Value: 3

DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK

Added in API level 31
static val DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK: Int

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.

Value: 128

DEVICE_INFO_SESSION_AVAILABLE_MASK

Added in API level 31
static val DEVICE_INFO_SESSION_AVAILABLE_MASK: Int

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.

Value: 48

DEVICE_INFO_TDLS_PERSISTENT_GROUP

Added in API level 31
static val DEVICE_INFO_TDLS_PERSISTENT_GROUP: Int

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.

Value: 4096

DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE

Added in API level 31
static val DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE: Int

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.

Value: 8192

DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT

Added in API level 31
static val DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT: Int

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.

Value: 512

DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT

Added in API level 31
static val DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT: Int

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.

Value: 64

DEVICE_TYPE_PRIMARY_SINK

Added in API level 30
static val DEVICE_TYPE_PRIMARY_SINK: Int

The device is a primary sink.

Value: 1

DEVICE_TYPE_SECONDARY_SINK

Added in API level 30
static val DEVICE_TYPE_SECONDARY_SINK: Int

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

Value: 2

DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK

Added in API level 30
static val DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK: Int

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

Value: 3

DEVICE_TYPE_WFD_SOURCE

Added in API level 30
static val DEVICE_TYPE_WFD_SOURCE: Int

The device is a Wifi Display Source.

Value: 0

PREFERRED_CONNECTIVITY_P2P

Added in API level 31
static val PREFERRED_CONNECTIVITY_P2P: Int

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

Value: 0

PREFERRED_CONNECTIVITY_TDLS

Added in API level 31
static val PREFERRED_CONNECTIVITY_TDLS: Int

Wifi Display (WFD) preferred connectivity is TDLS.

Value: 1

Public constructors

WifiP2pWfdInfo

Added in API level 30
WifiP2pWfdInfo()

Default constructor.

WifiP2pWfdInfo

Added in API level 30
WifiP2pWfdInfo(source: WifiP2pWfdInfo?)

Copy constructor.

Parameters
source WifiP2pWfdInfo?: This value may be null.

Public methods

describeContents

Added in API level 30
fun describeContents(): Int

Implement the Parcelable interface

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getControlPort

Added in API level 30
fun getControlPort(): Int

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

getMaxThroughput

Added in API level 30
fun getMaxThroughput(): Int

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

getR2DeviceInfo

Added in API level 31
fun getR2DeviceInfo(): Int

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.

Return
Int Value is either 0 or android.net.wifi.p2p.WifiP2pWfdInfo#DEVICE_INFO_DEVICE_TYPE_MASK

isContentProtectionSupported

Added in API level 30
fun isContentProtectionSupported(): Boolean
Return
Boolean true if Content Protection using the HDCP system 2.0/2.1 is supported.

isCoupledSinkSupportedAtSink

Added in API level 31
fun isCoupledSinkSupportedAtSink(): Boolean

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

isCoupledSinkSupportedAtSource

Added in API level 31
fun isCoupledSinkSupportedAtSource(): Boolean

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

isEnabled

Added in API level 30
fun isEnabled(): Boolean

Returns true is Wifi Display is enabled, false otherwise.

isR2Supported

Added in API level 31
fun isR2Supported(): Boolean

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

isSessionAvailable

Added in API level 30
fun isSessionAvailable(): Boolean

Returns true if a session is available, false otherwise.

setContentProtectionSupported

Added in API level 30
fun setContentProtectionSupported(enabled: Boolean): Unit

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

Added in API level 30
fun setControlPort(port: Int): Unit

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

Parameters
port Int: Value is 0 or greater

setCoupledSinkSupportAtSink

Added in API level 31
fun setCoupledSinkSupportAtSink(enabled: Boolean): Unit

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

Added in API level 31
fun setCoupledSinkSupportAtSource(enabled: Boolean): Unit

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.

setEnabled

Added in API level 30
fun setEnabled(enabled: Boolean): Unit

Sets whether Wifi Display should be enabled.

Parameters
enabled Boolean: true to enable Wifi Display, false to disable

setMaxThroughput

Added in API level 30
fun setMaxThroughput(maxThroughput: Int): Unit

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

Parameters
maxThroughput Int: Value is 0 or greater

setR2DeviceType

fun setR2DeviceType(deviceType: Int): Boolean

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 WifiManager#isWifiDisplayR2Supported()

setSessionAvailable

Added in API level 30
fun setSessionAvailable(enabled: Boolean): Unit

Sets whether a session is available.

Parameters
enabled Boolean: true to indicate that a session is available, false otherwise.

toString

Added in API level 30
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 30
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

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_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 30
static val CREATOR: Parcelable.Creator<WifiP2pWfdInfo!>

Implement the Parcelable interface