java.lang.Object | |
↳ | android.support.v4.media.MediaMetadataCompat |
Contains metadata about an item, such as the title, artist, etc.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MediaMetadataCompat.Builder | Use to build MediaMetadata objects. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | METADATA_KEY_ALBUM | The album title for the media. | |||||||||
String | METADATA_KEY_ALBUM_ART |
The artwork for the album of the media's original source as a
Bitmap .
|
|||||||||
String | METADATA_KEY_ALBUM_ARTIST | The artist for the album of the media's original source. | |||||||||
String | METADATA_KEY_ALBUM_ART_URI | The artwork for the album of the media's original source as a Uri style String. | |||||||||
String | METADATA_KEY_ART |
The artwork for the media as a Bitmap .
|
|||||||||
String | METADATA_KEY_ARTIST | The artist of the media. | |||||||||
String | METADATA_KEY_ART_URI | The artwork for the media as a Uri style String. | |||||||||
String | METADATA_KEY_AUTHOR | The author of the media. | |||||||||
String | METADATA_KEY_COMPILATION | The compilation status of the media. | |||||||||
String | METADATA_KEY_COMPOSER | The composer of the media. | |||||||||
String | METADATA_KEY_DATE | The date the media was created or published as TODO determine format. | |||||||||
String | METADATA_KEY_DISC_NUMBER | The disc number for the media's original source. | |||||||||
String | METADATA_KEY_DISPLAY_DESCRIPTION | A description that is suitable for display to the user. | |||||||||
String | METADATA_KEY_DISPLAY_ICON | An icon or thumbnail that is suitable for display to the user. | |||||||||
String | METADATA_KEY_DISPLAY_ICON_URI | An icon or thumbnail that is suitable for display to the user. | |||||||||
String | METADATA_KEY_DISPLAY_SUBTITLE | A subtitle that is suitable for display to the user. | |||||||||
String | METADATA_KEY_DISPLAY_TITLE | A title that is suitable for display to the user. | |||||||||
String | METADATA_KEY_DURATION | The duration of the media in ms. | |||||||||
String | METADATA_KEY_GENRE | The genre of the media. | |||||||||
String | METADATA_KEY_MEDIA_ID | A String key for identifying the content. | |||||||||
String | METADATA_KEY_NUM_TRACKS | The number of tracks in the media's original source. | |||||||||
String | METADATA_KEY_RATING | The overall rating for the media. | |||||||||
String | METADATA_KEY_TITLE | The title of the media. | |||||||||
String | METADATA_KEY_TRACK_NUMBER | The track number for the media. | |||||||||
String | METADATA_KEY_USER_RATING | The user's rating for the media. | |||||||||
String | METADATA_KEY_WRITER | The writer of the media. | |||||||||
String | METADATA_KEY_YEAR | The year the media was created or published as a long. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns true if the given key is contained in the metadata
| |||||||||||
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
| |||||||||||
Creates an instance from a framework
MediaMetadata
object.
| |||||||||||
Return a
Bitmap for the given key or null if no bitmap exists for
the given key.
| |||||||||||
Gets the bundle backing the metadata object.
| |||||||||||
Returns a simple description of this metadata for display purposes.
| |||||||||||
Returns the value associated with the given key, or 0L if no long exists
for the given key.
| |||||||||||
Gets the underlying framework
MediaMetadata object.
| |||||||||||
Return a
RatingCompat for the given key or null if no rating exists for
the given key.
| |||||||||||
Returns the value associated with the given key, or null if no mapping of
the desired type exists for the given key or a null value is explicitly
associated with the key.
| |||||||||||
Returns the value associated with the given key, or null if no mapping of
the desired type exists for the given key or a null value is explicitly
associated with the key.
| |||||||||||
Returns a Set containing the Strings used as keys in this metadata.
| |||||||||||
Get the number of fields in this metadata.
| |||||||||||
Flatten this object in to a Parcel.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
The album title for the media.
The artwork for the album of the media's original source as a
Bitmap
.
The artist for the album of the media's original source.
The artwork for the album of the media's original source as a Uri style String.
The artwork for the media as a Bitmap
.
The artist of the media.
The artwork for the media as a Uri style String.
The author of the media.
The compilation status of the media.
The composer of the media.
The date the media was created or published as TODO determine format.
The disc number for the media's original source.
A description that is suitable for display to the user. When displaying more information for media described by this metadata this should be preferred to other fields if present.
An icon or thumbnail that is suitable for display to the user. When
displaying an icon for media described by this metadata this should be
preferred to other fields if present. This must be a Bitmap
.
An icon or thumbnail that is suitable for display to the user. When displaying more information for media described by this metadata the display description should be preferred to other fields when present. This must be a Uri style String.
A subtitle that is suitable for display to the user. When displaying a second line for media described by this metadata this should be preferred to other fields if present.
A title that is suitable for display to the user. This will generally be
the same as METADATA_KEY_TITLE
but may differ for some formats.
When displaying media described by this metadata this should be preferred
if present.
The duration of the media in ms. A negative duration indicates that the duration is unknown (or infinite).
The genre of the media.
A String key for identifying the content. This value is specific to the service providing the content. If used, this should be a persistent unique key for the underlying content.
The number of tracks in the media's original source.
The overall rating for the media.
The title of the media.
The track number for the media.
The user's rating for the media.
The writer of the media.
The year the media was created or published as a long.
Returns true if the given key is contained in the metadata
key | a String key |
---|
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
Creates an instance from a framework MediaMetadata
object.
This method is only supported on
LOLLIPOP
and later.
metadataObj | A MediaMetadata object, or null
if none. |
---|
MediaMetadataCompat
object, or null if
none.
Gets the bundle backing the metadata object. This is available to support backwards compatibility. Apps should not modify the bundle directly.
Returns a simple description of this metadata for display purposes.
Returns the value associated with the given key, or 0L if no long exists for the given key.
key | The key the value is stored under |
---|
Gets the underlying framework MediaMetadata
object.
This method is only supported on
LOLLIPOP
and later.
MediaMetadata
object, or null
if none.
Return a RatingCompat
for the given key or null if no rating exists for
the given key.
key | The key the value is stored under |
---|
RatingCompat
or null
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | The key the value is stored under |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | The key the value is stored under |
---|
Returns a Set containing the Strings used as keys in this metadata.
Get the number of fields in this metadata.
Flatten this object in to a Parcel.
dest | The Parcel in which the object should be written. |
---|---|
flags | Additional flags about how the object should be written.
May be 0 or PARCELABLE_WRITE_RETURN_VALUE .
|