docs/doc/reference/com/google/android/exoplayer2/DeviceInfo.Builder.html
Package com.google.android.exoplayer2
Enclosing class:DeviceInfo
public static final classDeviceInfo.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Builder for DeviceInfo.
Constructors | Constructor | Description |
| --- | --- |
| Builder(@com.google.android.exoplayer2.DeviceInfo.PlaybackType int playbackType) |
Creates the builder.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| DeviceInfo | build() |
Builds the DeviceInfo.
|
| DeviceInfo.Builder | setMaxVolume(int maxVolume) |
Sets the maximum supported device volume.
|
| DeviceInfo.Builder | setMinVolume(int minVolume) |
Sets the minimum supported device volume.
|
| DeviceInfo.Builder | setRoutingControllerId(String routingControllerId) |
Sets the routing controller id of the associated MediaRouter2.RoutingController.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public Builder(@com.google.android.exoplayer2.DeviceInfo.PlaybackType int playbackType)
Creates the builder.
Parameters:playbackType - The DeviceInfo.PlaybackType.
-
@CanIgnoreReturnValue
public[DeviceInfo.Builder](DeviceInfo.Builder.html "class in com.google.android.exoplayer2")setMinVolume(@IntRange(from=0L)
int minVolume)
Sets the minimum supported device volume.
The minimum will be set to 0 if not specified.
Parameters:minVolume - The minimum device volume.Returns:This builder.
-
@CanIgnoreReturnValue
public[DeviceInfo.Builder](DeviceInfo.Builder.html "class in com.google.android.exoplayer2")setMaxVolume(@IntRange(from=0L)
int maxVolume)
Sets the maximum supported device volume.
Parameters:maxVolume - The maximum device volume, or 0 to leave the maximum unspecified.Returns:This builder.
-
@CanIgnoreReturnValue
public[DeviceInfo.Builder](DeviceInfo.Builder.html "class in com.google.android.exoplayer2")setRoutingControllerId(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")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 DeviceInfo.playbackType is DeviceInfo.PLAYBACK_TYPE_LOCAL.
Parameters:routingControllerId - The routing controller id of the associated MediaRouter2.RoutingController, or null to leave it unspecified.Returns:This builder.
-
public[DeviceInfo](DeviceInfo.html "class in com.google.android.exoplayer2")build()
Builds the DeviceInfo.