public interface

PlaybackSessionManager.Listener

 androidx.media3.exoplayer.analytics.PlaybackSessionManager.Listener

Subclasses:

MediaMetricsListener, PlaybackStatsListener

Overview

A listener for session updates.

Summary

Methods
public voidonAdPlaybackStarted(AnalyticsListener.EventTime eventTime, java.lang.String contentSessionId, java.lang.String adSessionId)

Called when a session is interrupted by ad playback.

public voidonSessionActive(AnalyticsListener.EventTime eventTime, java.lang.String sessionId)

Called when a session becomes active, i.e.

public voidonSessionCreated(AnalyticsListener.EventTime eventTime, java.lang.String sessionId)

Called when a new session is created as a result of PlaybackSessionManager.Listener.

public voidonSessionFinished(AnalyticsListener.EventTime eventTime, java.lang.String sessionId, boolean automaticTransitionToNextPlayback)

Called when a session is permanently finished.

Methods

public void onSessionCreated(AnalyticsListener.EventTime eventTime, java.lang.String sessionId)

Called when a new session is created as a result of PlaybackSessionManager.Listener.

Parameters:

eventTime: The AnalyticsListener.EventTime at which the session is created.
sessionId: The identifier of the new session.

public void onSessionActive(AnalyticsListener.EventTime eventTime, java.lang.String sessionId)

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

Parameters:

eventTime: The AnalyticsListener.EventTime at which the session becomes active.
sessionId: The identifier of the session.

public void onAdPlaybackStarted(AnalyticsListener.EventTime eventTime, java.lang.String contentSessionId, java.lang.String adSessionId)

Called when a session is interrupted by ad playback.

Parameters:

eventTime: The AnalyticsListener.EventTime at which the ad playback starts.
contentSessionId: The session identifier of the content session.
adSessionId: The identifier of the ad session.

public void onSessionFinished(AnalyticsListener.EventTime eventTime, java.lang.String sessionId, boolean automaticTransitionToNextPlayback)

Called when a session is permanently finished.

Parameters:

eventTime: The AnalyticsListener.EventTime at which the session finished.
sessionId: The identifier of the finished session.
automaticTransitionToNextPlayback: Whether the session finished because of an automatic transition to the next playback item.