public final class

MediaSessionStatus.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.mediarouter.media.MediaSessionStatus.Builder

Overview

Builder for media session status objects.

Summary

Constructors
publicBuilder(int sessionState)

Creates a media session status builder using the current time as the reference timestamp.

publicBuilder(MediaSessionStatus status)

Creates a media session status builder whose initial contents are copied from an existing status.

Methods
public MediaSessionStatusbuild()

Builds the media session status object.

public MediaSessionStatus.BuildersetExtras(Bundle extras)

Sets a bundle of extras for this status object.

public MediaSessionStatus.BuildersetQueuePaused(boolean queuePaused)

Sets whether the queue is paused.

public MediaSessionStatus.BuildersetSessionState(int sessionState)

Sets the session state.

public MediaSessionStatus.BuildersetTimestamp(long elapsedRealtimeTimestamp)

Sets the timestamp associated with the status information in milliseconds since boot in the time base.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(int sessionState)

Creates a media session status builder using the current time as the reference timestamp.

Parameters:

sessionState: The session state.

public Builder(MediaSessionStatus status)

Creates a media session status builder whose initial contents are copied from an existing status.

Methods

public MediaSessionStatus.Builder setTimestamp(long elapsedRealtimeTimestamp)

Sets the timestamp associated with the status information in milliseconds since boot in the time base.

public MediaSessionStatus.Builder setSessionState(int sessionState)

Sets the session state.

public MediaSessionStatus.Builder setQueuePaused(boolean queuePaused)

Sets whether the queue is paused.

public MediaSessionStatus.Builder setExtras(Bundle extras)

Sets a bundle of extras for this status object. The extras will be ignored by the media router but they may be used by applications.

public MediaSessionStatus build()

Builds the media session status object.