Google 致力于为黑人社区推动种族平等。查看具体举措

MediaMetadataCompat

class MediaMetadataCompat : Parcelable
kotlin.Any
   ↳ android.support.v4.media.MediaMetadataCompat

Contains metadata about an item, such as the title, artist, etc.

Summary

Nested classes

Use to build MediaMetadata objects.

Constants

static String

Whether the media is an advertisement.

static String

The album title for the media.

static String

The artwork for the album of the media's original source as a Bitmap.

static String

The artist for the album of the media's original source.

static String

The artwork for the album of the media's original source as a Uri style String.

static String

The artwork for the media as a Bitmap.

static String

The artist of the media.

static String

The artwork for the media as a Uri style String.

static String

The author of the media.

static String

The bluetooth folder type of the media specified in the section 6.

static String

The compilation status of the media.

static String

The composer of the media.

static String

The date the media was created or published.

static String

The disc number for the media's original source.

static String

A description that is suitable for display to the user.

static String

An icon or thumbnail that is suitable for display to the user.

static String

An icon or thumbnail that is suitable for display to the user.

static String

A subtitle that is suitable for display to the user.

static String

A title that is suitable for display to the user.

static String

The download status of the media which will be used for later offline playback.

static String

The duration of the media in ms.

static String

The genre of the media.

static String

A String key for identifying the content.

static String

A Uri formatted String representing the content.

static String

The number of tracks in the media's original source.

static String

The overall rating for the media.

static String

The title of the media.

static String

The track number for the media.

static String

The user's rating for the media.

static String

The writer of the media.

static String

The year the media was created or published as a long.

Public methods

Boolean

Returns true if the given key is contained in the metadata

Int

static MediaMetadataCompat!
fromMediaMetadata(metadataObj: Any!)

Creates an instance from a framework android.media.MediaMetadata object.

Bitmap!

Return a Bitmap for the given key or null if no bitmap exists for the given key.

Bundle!

Gets a copy of the bundle for this metadata object.

MediaDescriptionCompat!

Returns a simple description of this metadata for display purposes.

Long
getLong(key: String!)

Returns the value associated with the given key, or 0L if no long exists for the given key.

Any!

Gets the underlying framework android.media.MediaMetadata object.

RatingCompat!

Return a RatingCompat for the given key or null if no rating exists for the given key.