Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

Builder

class Builder
kotlin.Any
   ↳ androidx.mediarouter.media.MediaSessionStatus.Builder

Builder for media session status objects.

Summary

Public constructors

<init>(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 methods

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 SystemClock#elapsedRealtime time base.

Public constructors

<init>

Builder(sessionState: Int)

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

Parameters
sessionState Int: The session state.

<init>

Builder(status: MediaSessionStatus!)

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

Public methods

build

fun build(): MediaSessionStatus!

Builds the media session status object.

setExtras

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

fun setQueuePaused(queuePaused: Boolean): MediaSessionStatus.Builder!

Sets whether the queue is paused.

setSessionState

fun setSessionState(sessionState: Int): MediaSessionStatus.Builder!

Sets the session state.

setTimestamp

fun setTimestamp(elapsedRealtimeTimestamp: Long): MediaSessionStatus.Builder!

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