Describes the playback status of a media session.
This class is part of the remote playback protocol described by the
{@link MediaControlIntent MediaControlIntent} class.
When a media session is created, it is initially in the
{@link #SESSION_STATE_ACTIVE active} state. When the media session ends
normally, it transitions to the {@link #SESSION_STATE_ENDED ended} state.
If the media session is invalidated due to another session forcibly taking
control of the route, then it transitions to the
{@link #SESSION_STATE_INVALIDATED invalidated} state.
Refer to the documentation of each state for an explanation of its meaning.
To monitor session status, the application should supply a {@link PendingIntent} to use as the
{@link MediaControlIntent#EXTRA_SESSION_STATUS_UPDATE_RECEIVER session status update receiver}
for a given {@link MediaControlIntent#ACTION_START_SESSION session start request}.
This object is immutable once created using a {@link Builder} instance.
|