PlaybackSessionManager.Listener


public interface PlaybackSessionManager.Listener


A listener for session updates.

Summary

Public methods

abstract void
onAdPlaybackStarted(
    AnalyticsListener.EventTime eventTime,
    String contentSessionId,
    String adSessionId
)

Called when a session is interrupted by ad playback.

abstract void
onSessionActive(
    AnalyticsListener.EventTime eventTime,
    String sessionId
)

Called when a session becomes active, i.e. playing in the foreground.

abstract void
onSessionCreated(
    AnalyticsListener.EventTime eventTime,
    String sessionId
)

Called when a new session is created as a result of updateSessions.

abstract void
onSessionFinished(
    AnalyticsListener.EventTime eventTime,
    String sessionId,
    boolean automaticTransitionToNextPlayback
)

Called when a session is permanently finished.

Public methods

onAdPlaybackStarted

abstract void onAdPlaybackStarted(
    AnalyticsListener.EventTime eventTime,
    String contentSessionId,
    String adSessionId
)

Called when a session is interrupted by ad playback.

Parameters
AnalyticsListener.EventTime eventTime

The EventTime at which the ad playback starts.

String contentSessionId

The session identifier of the content session.

String adSessionId

The identifier of the ad session.

onSessionActive

abstract void onSessionActive(
    AnalyticsListener.EventTime eventTime,
    String sessionId
)

Called when a session becomes active, i.e. playing in the foreground.

Parameters
AnalyticsListener.EventTime eventTime

The EventTime at which the session becomes active.

String sessionId

The identifier of the session.

onSessionCreated

abstract void onSessionCreated(
    AnalyticsListener.EventTime eventTime,
    String sessionId
)

Called when a new session is created as a result of updateSessions.

Parameters
AnalyticsListener.EventTime eventTime

The EventTime at which the session is created.

String sessionId

The identifier of the new session.

onSessionFinished

abstract void onSessionFinished(
    AnalyticsListener.EventTime eventTime,
    String sessionId,
    boolean automaticTransitionToNextPlayback
)

Called when a session is permanently finished.

Parameters
AnalyticsListener.EventTime eventTime

The EventTime at which the session finished.

String sessionId

The identifier of the finished session.

boolean automaticTransitionToNextPlayback

Whether the session finished because of an automatic transition to the next playback item.