public abstract static class MediaRouter.VolumeCallback extends Object
A VolumeCallback will only receive events relevant to routes that the callback was registered for.
UserRouteInfo#setVolumeCallback(VolumeCallback)
Constructor and Description |
---|
VolumeCallback() |
Modifier and Type | Method and Description |
---|---|
abstract void |
onVolumeSetRequest(MediaRouter.RouteInfo info,
int volume)
Called when the volume for the route should be set to the given value
|
abstract void |
onVolumeUpdateRequest(MediaRouter.RouteInfo info,
int direction)
Called when the volume for the route should be increased or decreased.
|
public abstract void onVolumeUpdateRequest(MediaRouter.RouteInfo info, int direction)
info
- the route affected by this eventdirection
- an integer indicating whether the volume is to be increased
(positive value) or decreased (negative value).
For bundled changes, the absolute value indicates the number of changes
in the same direction, e.g. +3 corresponds to three "volume up" changes.public abstract void onVolumeSetRequest(MediaRouter.RouteInfo info, int volume)
info
- the route affected by this eventvolume
- an integer indicating the new volume value that should be used, always
between 0 and the value set by MediaRouter.UserRouteInfo.setVolumeMax(int)
.