MediaSessionCompat.Token


class MediaSessionCompat.Token : Parcelable


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 functions

Int
Boolean
equals(obj: Any!)
java-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)

Constants

CREATOR

Added in 1.1.0
const val CREATORParcelable.Creator<MediaSessionCompat.Token!>!

Public functions

describeContents

Added in 1.1.0
fun describeContents(): Int

equals

fun equals(obj: Any!): Boolean

fromToken

Added in 1.1.0
java-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 LOLLIPOP and later.

Parameters
token: Any!

The framework token object.

Returns
MediaSessionCompat.Token!

A compat Token for use with MediaControllerCompat.

getToken

Added in 1.1.0
fun getToken(): Any!

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

This method is only supported on API 21+.

Returns
Any!

The underlying android.media.session.MediaSession.Token object, or null if none.

hashCode

fun hashCode(): Int

writeToParcel

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