Google is committed to advancing racial equity for Black communities. See how.

UIController

public abstract class UIController extends Object

Base class for implementing a UI controller that receives media status updates from the cast receiver. This can be subclassed to implement custom controls such as "thumb up" button when using UIMediaController to implement your media playback UI.

Public Constructor Summary

Public Method Summary

void
onMediaStatusUpdated()
Called when there is an updated MediaStatus on the RemoteMediaClient.
void
onSendingRemoteMediaRequest()
Called when there is a outgoing remote media request on the RemoteMediaClient.
void
onSessionConnected(CastSession castSession)
Called when a CastSession is connected.
void
onSessionEnded()
Called when a CastSession is ended.

Protected Method Summary

RemoteMediaClient
getRemoteMediaClient()
Returns the managed RemoteMediaClient of the current active CastSession, if any.

Inherited Method Summary

Public Constructors

public UIController ()

Public Methods

public void onMediaStatusUpdated ()

Called when there is an updated MediaStatus on the RemoteMediaClient.

public void onSendingRemoteMediaRequest ()

Called when there is a outgoing remote media request on the RemoteMediaClient.

public void onSessionConnected (CastSession castSession)

Called when a CastSession is connected. Subclass must call through to super when overriding this method. getRemoteMediaClient() will return the managed RemoteMediaClient after this method is called.

public void onSessionEnded ()

Called when a CastSession is ended. Subclass must call through to super when overriding this method. getRemoteMediaClient() will return null after this method is called.

Protected Methods

protected RemoteMediaClient getRemoteMediaClient ()

Returns the managed RemoteMediaClient of the current active CastSession, if any.