DeviceInfo
public final class DeviceInfo
Information about the playback device.
Summary
Nested types |
|---|
public final class DeviceInfo.BuilderBuilder for |
@DocumentedTypes of playback. |
Constants |
|
|---|---|
static final int |
Playback happens on the local device (e.g. phone). |
static final int |
Playback happens outside of the device (e.g. a cast device). |
static final DeviceInfo |
Unknown DeviceInfo. |
Public fields |
|
|---|---|
final @IntRange(from = 0) int |
The maximum volume that the device supports, or |
final @IntRange(from = 0) int |
The minimum volume that the device supports. |
final int |
The type of playback. |
final @Nullable String |
The |
Public constructors |
|---|
@UnstableApiThis method is deprecated. Use |
Public methods |
|
|---|---|
boolean |
|
static DeviceInfo |
@UnstableApiRestores a |
int |
hashCode() |
Bundle |
Constants
PLAYBACK_TYPE_LOCAL
public static final int PLAYBACK_TYPE_LOCAL = 0
Playback happens on the local device (e.g. phone).
PLAYBACK_TYPE_REMOTE
public static final int PLAYBACK_TYPE_REMOTE = 1
Playback happens outside of the device (e.g. a cast device).
Public fields
maxVolume
public final @IntRange(from = 0) int maxVolume
The maximum volume that the device supports, or 0 if unspecified.
minVolume
public final @IntRange(from = 0) int minVolume
The minimum volume that the device supports.
routingControllerId
public final @Nullable String routingControllerId
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.
Public constructors
DeviceInfo
@UnstableApi
publicDeviceInfo(
@DeviceInfo.PlaybackType int playbackType,
@IntRange(from = 0) int minVolume,
@IntRange(from = 0) int maxVolume
)
Public methods
fromBundle
@UnstableApi
public static DeviceInfo fromBundle(Bundle bundle)
Restores a DeviceInfo from a Bundle.