Summary: Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]
public abstract class

# UIController

extends Object

java.lang.Object
↳ | com.google.android.gms.cast.framework.media.uicontroller.UIController

## Class Overview

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.

## Summary

Public Constructors
| UIController()

Public Methods
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 Methods
RemoteMediaClient | getRemoteMediaClient() Returns the managed `RemoteMediaClient` of the current active `CastSession`, if any.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## 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.