Summary: Methods | [Expand All]
public interface

# SessionManagerListener

com.google.android.gms.cast.framework.SessionManagerListener<T extends com.google.android.gms.cast.framework.Session>

Known Indirect Subclasses UIMediaController
UIMediaController | A `UIMediaController` lets you bind the state of Android UI components to the state of a remote `CastSession`.

## Class Overview

A listener interface for monitoring events of a particular type of `Session` instance.

## Summary

Public Methods
abstract void | onSessionEnded(T session, int error) Called when a `session` has ended.
abstract void | onSessionEnding(T session) Called when a `session` is ending.
abstract void | onSessionResumeFailed(T session, int error) Called when a previous saved `session` failed to resume.
abstract void | onSessionResumed(T session, boolean wasSuspended) Called when `session` has been successfully resumed.
abstract void | onSessionResuming(T session, String sessionId) Called when a `session` is attempting to resume.
abstract void | onSessionStartFailed(T session, int error) Called when a `session` failed to start.
abstract void | onSessionStarted(T session, String sessionId) Called when a `session` has been successfully started.
abstract void | onSessionStarting(T session) Called when a `session` is attempting to start.
abstract void | onSessionSuspended(T session, int reason) Called when a `session` has been suspended.

## Public Methods

#### public abstract void onSessionEnded (T session, int error)

Called when a `session` has ended.

##### Parameters

session | The `Session`.
error | The error code, one of `CastStatusCodes`.

#### public abstract void onSessionEnding (T session)

Called when a `session` is ending.

##### Parameters

session | The `Session`.

#### public abstract void onSessionResumeFailed (T session, int error)

Called when a previous saved `session` failed to resume.

##### Parameters

session | The `Session`.
error | The error code, one of `CastStatusCodes`.

#### public abstract void onSessionResumed (T session, boolean wasSuspended)

Called when `session` has been successfully resumed. If `wasSuspended` is `true`, then `session` is resumed from the previous suspension. Otherwise it is resumed from the previous saved session.

##### Parameters

session | The `Session`.
wasSuspended | Is the session resumed from suspension.

#### public abstract void onSessionResuming (T session, String sessionId)

Called when a `session` is attempting to resume.

##### Parameters

session | The `Session`.
sessionId | ID of the started session.

#### public abstract void onSessionStartFailed (T session, int error)

Called when a `session` failed to start.

##### Parameters

session | The `Session`.
error | The error code, one of `CastStatusCodes`.

#### public abstract void onSessionStarted (T session, String sessionId)

Called when a `session` has been successfully started.

##### Parameters

session | The `Session`.
sessionId | ID of the started session.

#### public abstract void onSessionStarting (T session)

Called when a `session` is attempting to start.

##### Parameters

session | The `Session`.

#### public abstract void onSessionSuspended (T session, int reason)

Called when a `session` has been suspended.

##### Parameters

session | The `Session`.
reason | The reason for suspension. Defined in `GoogleApiClient.ConnectionCallbacks.CAUSE_*`.