Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public static final class

MediaItemStatus.Builder

extends Object
java.lang.Object
   ↳ android.support.v7.media.MediaItemStatus.Builder

Class Overview

Builder for media item status objects .

Summary

Public Constructors
MediaItemStatus.Builder (int playbackState)
Creates a media item status builder using the current time as the reference timestamp.
MediaItemStatus.Builder ( MediaItemStatus status)
Creates a media item status builder whose initial contents are copied from an existing status.
Public Methods
MediaItemStatus build ()
MediaItemStatus.Builder setContentDuration (long durationMilliseconds)
Sets the total duration of the content to be played as a long integer number of milliseconds.
MediaItemStatus.Builder setContentPosition (long positionMilliseconds)
Sets the content playback position as a long integer number of milliseconds from the beginning of the content.
MediaItemStatus.Builder setExtras ( Bundle extras)
Sets a bundle of extras for this status object.
MediaItemStatus.Builder setPlaybackState (int playbackState)
Sets the playback state of the media item.
MediaItemStatus.Builder setTimestamp (long elapsedRealtimeTimestamp)
Sets the timestamp associated with the status information in milliseconds since boot in the elapsedRealtime() time base.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MediaItemStatus.Builder (int playbackState)

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

Parameters
playbackState The item playback state.

public MediaItemStatus.Builder ( MediaItemStatus status)

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

Public Methods

public MediaItemStatus.Builder setContentDuration (long durationMilliseconds)

Sets the total duration of the content to be played as a long integer number of milliseconds.

public MediaItemStatus.Builder setContentPosition (long positionMilliseconds)

Sets the content playback position as a long integer number of milliseconds from the beginning of the content.

public MediaItemStatus.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 MediaItemStatus.Builder setPlaybackState (int playbackState)

Sets the playback state of the media item.

public MediaItemStatus.Builder setTimestamp (long elapsedRealtimeTimestamp)

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