Register now for Android Dev Summit 2019!

RemoteSessionPlayer.Callback

public static class RemoteSessionPlayer.Callback
extends SessionPlayer.PlayerCallback

java.lang.Object
   ↳ androidx.media2.common.SessionPlayer.PlayerCallback
     ↳ androidx.media2.session.RemoteSessionPlayer.Callback


A callback class to receive notifications for events on the remote session player. See SessionPlayer.registerPlayerCallback(Executor, PlayerCallback) to register this callback.

This is registered by MediaSession to notify volume changes to the MediaController.

Summary

Public constructors

RemoteSessionPlayer.Callback()

Public methods

void onVolumeChanged(RemoteSessionPlayer player, int volume)

Called to indicate that the volume has changed.

Inherited methods

Public constructors

RemoteSessionPlayer.Callback

public RemoteSessionPlayer.Callback ()

Public methods

onVolumeChanged

public void onVolumeChanged (RemoteSessionPlayer player, 
                int volume)

Called to indicate that the volume has changed.

Parameters
player RemoteSessionPlayer: the player that has changed volume.

volume int: the new volume