Added in API level 21

QueueItem


class QueueItem : Parcelable
kotlin.Any
   ↳ android.media.session.MediaSession.QueueItem

A single item that is part of the play queue. It contains a description of the item and its id in the queue.

Summary

Constants
static Int

This id is reserved.

Inherited constants
Public constructors
QueueItem(description: MediaDescription!, id: Long)

Create a new MediaSession.QueueItem.

Public methods
Int

Boolean
equals(other: Any?)

MediaDescription!

Get the description for this item.

Long

Get the queue id for this item.

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<MediaSession.QueueItem!>

Constants

UNKNOWN_ID

Added in API level 21
static val UNKNOWN_ID: Int

This id is reserved. No items can be explicitly assigned this id.

Value: -1

Public constructors

QueueItem

Added in API level 21
QueueItem(
    description: MediaDescription!,
    id: Long)

Create a new MediaSession.QueueItem.

Parameters
description MediaDescription!: The MediaDescription for this item.
id Long: An identifier for this item. It must be unique within the play queue and cannot be UNKNOWN_ID.

Public methods

describeContents

Added in API level 21
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

equals

Added in API level 21
fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getDescription

Added in API level 21
fun getDescription(): MediaDescription!

Get the description for this item.

getQueueId

Added in API level 21
fun getQueueId(): Long

Get the queue id for this item.

toString

Added in API level 21
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 21
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 21
static val CREATOR: Parcelable.Creator<MediaSession.QueueItem!>