MediaSessionStatus.Builder


class MediaSessionStatus.Builder


Builder for media session status objects.

Summary

Public constructors

Builder(sessionState: Int)

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

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

Public functions

MediaSessionStatus

Builds the media session status object.

MediaSessionStatus.Builder
setExtras(extras: Bundle?)

Sets a bundle of extras for this status object.

MediaSessionStatus.Builder
setQueuePaused(queuePaused: Boolean)

Sets whether the queue is paused.

MediaSessionStatus.Builder
setSessionState(sessionState: Int)

Sets the session state.

MediaSessionStatus.Builder
setTimestamp(elapsedRealtimeTimestamp: Long)

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

Public constructors

Builder

Added in 1.1.0
Builder(sessionState: Int)

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

Parameters
sessionState: Int

The session state.

Builder

Added in 1.1.0
Builder(status: MediaSessionStatus)

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

Public functions

build

Added in 1.1.0
fun build(): MediaSessionStatus

Builds the media session status object.

setExtras

Added in 1.1.0
fun setExtras(extras: Bundle?): MediaSessionStatus.Builder

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.

setQueuePaused

Added in 1.1.0
fun setQueuePaused(queuePaused: Boolean): MediaSessionStatus.Builder

Sets whether the queue is paused.

setSessionState

Added in 1.1.0
fun setSessionState(sessionState: Int): MediaSessionStatus.Builder

Sets the session state.

setTimestamp

Added in 1.1.0
fun setTimestamp(elapsedRealtimeTimestamp: Long): MediaSessionStatus.Builder

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