class DeviceInfo


Information about the playback device.

Summary

Nested types

Builder for DeviceInfo.

Types of playback.

Constants

const Int

Playback happens on the local device (e.g. phone).

const Int

Playback happens outside of the device (e.g. a cast device).

const DeviceInfo!

Unknown DeviceInfo.

Public constructors

@UnstableApi
DeviceInfo(
    @DeviceInfo.PlaybackType playbackType: Int,
    minVolume: @IntRange(from = 0) Int,
    maxVolume: @IntRange(from = 0) Int
)

This function is deprecated.

Use Builder instead.

Public functions

Boolean
equals(obj: Any?)
java-static DeviceInfo!

Restores a DeviceInfo from a Bundle.

Int
Bundle!

Public properties

@IntRange(from = 0) Int

The maximum volume that the device supports, or 0 if unspecified.

@IntRange(from = 0) Int

The minimum volume that the device supports.

Int

The type of playback.

String?

The routing controller id of the associated MediaRouter2.RoutingController, or null if unset or playbackType is PLAYBACK_TYPE_LOCAL.

Constants

PLAYBACK_TYPE_LOCAL

const val PLAYBACK_TYPE_LOCAL = 0: Int

Playback happens on the local device (e.g. phone).

PLAYBACK_TYPE_REMOTE

const val PLAYBACK_TYPE_REMOTE = 1: Int

Playback happens outside of the device (e.g. a cast device).

UNKNOWN

const val UNKNOWNDeviceInfo!

Unknown DeviceInfo.

Public constructors

DeviceInfo

@UnstableApi
DeviceInfo(
    @DeviceInfo.PlaybackType playbackType: Int,
    minVolume: @IntRange(from = 0) Int,
    maxVolume: @IntRange(from = 0) Int
)

Public functions

equals

fun equals(obj: Any?): Boolean

fromBundle

@UnstableApi
java-static fun fromBundle(bundle: Bundle!): DeviceInfo!

Restores a DeviceInfo from a Bundle.

hashCode

fun hashCode(): Int

toBundle

@UnstableApi
fun toBundle(): Bundle!

Public properties

maxVolume

val maxVolume: @IntRange(from = 0) Int

The maximum volume that the device supports, or 0 if unspecified.

minVolume

val minVolume: @IntRange(from = 0) Int

The minimum volume that the device supports.

playbackType

@DeviceInfo.PlaybackType
val playbackTypeInt

The type of playback.

routingControllerId

val routingControllerIdString?

The routing controller id of the associated MediaRouter2.RoutingController, or null if unset or playbackType is PLAYBACK_TYPE_LOCAL.

This id allows mapping this device information to a routing controller, which provides information about the media route and allows controlling its volume.