DeviceInfo.Builder
public final class DeviceInfo.Builder
Builder for DeviceInfo.
Summary
Public constructors |
|---|
Builder(@DeviceInfo.PlaybackType int playbackType)Creates the builder. |
Public methods |
|
|---|---|
DeviceInfo |
build()Builds the |
DeviceInfo.Builder |
@CanIgnoreReturnValueSets the maximum supported device volume. |
DeviceInfo.Builder |
@CanIgnoreReturnValueSets the minimum supported device volume. |
DeviceInfo.Builder |
@CanIgnoreReturnValueSets the |
Public constructors
Builder
public Builder(@DeviceInfo.PlaybackType int playbackType)
Creates the builder.
| Parameters | |
|---|---|
@DeviceInfo.PlaybackType int playbackType |
The |
Public methods
setMaxVolume
@CanIgnoreReturnValue
public DeviceInfo.Builder setMaxVolume(@IntRange(from = 0) int maxVolume)
Sets the maximum supported device volume.
| Parameters | |
|---|---|
@IntRange(from = 0) int maxVolume |
The maximum device volume, or |
| Returns | |
|---|---|
DeviceInfo.Builder |
This builder. |
setMinVolume
@CanIgnoreReturnValue
public DeviceInfo.Builder setMinVolume(@IntRange(from = 0) int minVolume)
Sets the minimum supported device volume.
The minimum will be set to 0 if not specified.
| Parameters | |
|---|---|
@IntRange(from = 0) int minVolume |
The minimum device volume. |
| Returns | |
|---|---|
DeviceInfo.Builder |
This builder. |
setRoutingControllerId
@CanIgnoreReturnValue
public DeviceInfo.Builder setRoutingControllerId(@Nullable String routingControllerId)
Sets the routing controller id of the associated MediaRouter2.RoutingController.
This id allows mapping this device information to a routing controller, which provides information about the media route and allows controlling its volume.
The set value must be null if playbackType is PLAYBACK_TYPE_LOCAL.
| Parameters | |
|---|---|
@Nullable String routingControllerId |
The |
| Returns | |
|---|---|
DeviceInfo.Builder |
This builder. |