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

Token

class Token : Parcelable
kotlin.Any
   ↳ android.support.v4.media.session.MediaSessionCompat.Token

Represents an ongoing session. This may be passed to apps by the session owner to allow them to create a MediaControllerCompat to communicate with the session.

Summary

Public methods

Int

Boolean
equals(other: Any?)

static MediaSessionCompat.Token!
fromToken(token: Any!)

Creates a compat Token from a framework android.media.session.MediaSession.Token object.

Any!

Gets the underlying framework android.media.session.MediaSession.Token object.

Int

Unit
writeToParcel(dest: Parcel!, flags: Int)

Properties

static Creator<MediaSessionCompat.Token!>!

Public methods

describeContents

fun describeContents(): Int

equals

fun equals(other: Any?): Boolean

fromToken

static fun fromToken(token: Any!): MediaSessionCompat.Token!

Creates a compat Token from a framework android.media.session.MediaSession.Token object.

This method is only supported on android.os.Build.VERSION_CODES#LOLLIPOP and later.

Parameters
token Any!: The framework token object.
Return
MediaSessionCompat.Token!: A compat Token for use with MediaControllerCompat.

getToken

fun getToken(): Any!

Gets the underlying framework android.media.session.MediaSession.Token object.

This method is only supported on API 21+.

Return
Any!: The underlying android.media.session.MediaSession.Token object, or null if none.

hashCode

fun hashCode(): Int

writeToParcel

fun writeToParcel(dest: Parcel!, flags: Int): Unit

Properties

CREATOR

static val CREATOR: Creator<MediaSessionCompat.Token!>!