MediaMetadata


class MediaMetadata : Bundleable


Metadata of a MediaItem, playlist, or a combination of multiple sources of .

Summary

Nested types

A builder for MediaMetadata instances.

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = )
@IntDef(value = )
annotation MediaMetadata.FolderType

This annotation is deprecated.

Use isBrowsable to indicate if an item is a browsable folder and use mediaType to indicate the type of the folder.

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = TYPE_USE)
@IntDef(value = )
annotation MediaMetadata.MediaType

The type of content described by the media item.

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = )
@IntDef(value = )
annotation MediaMetadata.PictureType

The picture type of the artwork.

Constants

const Bundleable.Creator<MediaMetadata!>!

This property is deprecated.

Use fromBundle instead.

const MediaMetadata!

Empty MediaMetadata.

const Int

This property is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_ALBUMS instead.

const Int

This property is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_ARTISTS instead.

const Int

This property is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_GENRES instead.

const Int

This property is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_MIXED instead.

const Int

This property is deprecated.

Use isBrowsable set to false instead.

const Int

This property is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_PLAYLISTS instead.

const Int

This property is deprecated.

Use isBrowsable set to true instead.

const Int

This property is deprecated.

Use isBrowsable set to true and mediaType set to MEDIA_TYPE_FOLDER_YEARS instead.

const Int

MediaType for a group of items (e.g., music) belonging to an album.

const Int

MediaType for a group of items (e.g., music) from the same artist.

const Int

MediaType for a group of items forming an audio book.

const Int

MediaType for an audio book chapter.

const Int

MediaType for a folder containing albums.

const Int

MediaType for a folder containing artists.

const Int

MediaType for a folder containing audio books.

const Int

MediaType for a folder containing genres.

const Int

MediaType for a folder with mixed or undetermined content.

const Int

MediaType for a folder containing movies.

const Int

MediaType for a folder containing news.

const Int

MediaType for a folder containing playlists.

const Int

MediaType for a folder containing podcasts.

const Int

MediaType for a folder containing radio stations.

const Int

MediaType for a folder containing movie trailers.

const Int

MediaType for a folder containing TV channels.

const Int

MediaType for a folder containing TV series.

const Int

MediaType for a folder containing TV shows.

const Int

MediaType for a folder containing videos.

const Int

MediaType for a folder containing years.

const Int

MediaType for a group of items (e.g., music) of the same genre.

const Int

Media of undetermined type or a mix of multiple media types.

const Int

MediaType for a movie.

const Int

MediaType for music.

const Int

MediaType for news.

const Int

MediaType for a group of items (e.g., music) forming a playlist.

const Int

MediaType for a group of items belonging to a podcast.

const Int

MediaType for a podcast episode.

const Int

MediaType for a radio station.

const Int

MediaType for a movie trailer.

const Int

MediaType for a group of items that are part of a TV channel.

const Int

MediaType for a group of items that are part of a TV series.

const Int

MediaType for a group of items that are part of a TV series.

const Int

MediaType for a TV show.

const Int

MediaType for a video.

const Int

MediaType for a group of items (e.g., music) from the same year.

const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int

Public functions

MediaMetadata.Builder!

Returns a new Builder instance with the current MediaMetadata fields.

Boolean
equals(obj: Any?)

Note: Equality checking does not consider extras.

java-static MediaMetadata!

Restores a MediaMetadata from a Bundle.

Int
Bundle!

Returns a Bundle representing the information stored in this object.

Public properties

CharSequence?

Optional album artist.

CharSequence?

Optional album title.

CharSequence?

Optional artist.

ByteArray<Byte>?

Optional artwork data as a compressed byte array.

@MediaMetadata.PictureType Int?

Optional PictureType of the artwork data.

Uri?

Optional artwork Uri.

CharSequence?

Optional compilation.

CharSequence?

Optional composer.

CharSequence?

Optional conductor.

CharSequence?

Optional description.

Int?

Optional disc number.

CharSequence?

Optional display title.

Bundle?

Optional extras Bundle.

@MediaMetadata.FolderType Int?

This property is deprecated.

Use isBrowsable to indicate if an item is a browsable folder and use mediaType to indicate the type of the folder.

CharSequence?

Optional genre.

Boolean?

Optional boolean to indicate that the media is a browsable folder.

Boolean?

Optional boolean to indicate that the media is playable.

@MediaMetadata.MediaType Int?

Optional MediaType.

Rating?

Optional overall Rating.

Int?

Optional day of the recording date.

Int?

Optional month of the recording date.

Int?

Optional year of the recording date.

Int?

Optional day of the release date.

Int?

Optional month of the release date.

Int?

Optional year of the release date.

CharSequence?

Optional name of the station streaming the media.

CharSequence?

Optional subtitle.

CharSequence?

Optional title.

Int?

Optional total number of discs.

Int?

Optional total number of tracks.

Int?

Optional track number.

Rating?

Optional user Rating.

CharSequence?

Optional writer.

Int?

This property is deprecated.

Use recordingYear instead.

Constants

CREATOR

@UnstableApi
const val CREATORBundleable.Creator<MediaMetadata!>!

Object that can restore MediaMetadata from a Bundle.

EMPTY

const val EMPTYMediaMetadata!

Empty MediaMetadata.

FOLDER_TYPE_ALBUMS

const val FOLDER_TYPE_ALBUMS = 2: Int

Type for a folder containing media categorized by album.

FOLDER_TYPE_ARTISTS

const val FOLDER_TYPE_ARTISTS = 3: Int

Type for a folder containing media categorized by artist.

FOLDER_TYPE_GENRES

const val FOLDER_TYPE_GENRES = 4: Int

Type for a folder containing media categorized by genre.

FOLDER_TYPE_MIXED

const val FOLDER_TYPE_MIXED = 0: Int

Type for a folder containing media of mixed types.

FOLDER_TYPE_NONE

const val FOLDER_TYPE_NONE = -1: Int

Type for an item that is not a folder.

FOLDER_TYPE_PLAYLISTS

const val FOLDER_TYPE_PLAYLISTS = 5: Int

Type for a folder containing a playlist.

FOLDER_TYPE_TITLES

const val FOLDER_TYPE_TITLES = 1: Int

Type for a folder containing only playable media.

FOLDER_TYPE_YEARS

const val FOLDER_TYPE_YEARS = 6: Int

Type for a folder containing media categorized by year.

MEDIA_TYPE_ALBUM

const val MEDIA_TYPE_ALBUM = 10: Int

MediaType for a group of items (e.g., music) belonging to an album.

MEDIA_TYPE_ARTIST

const val MEDIA_TYPE_ARTIST = 11: Int

MediaType for a group of items (e.g., music) from the same artist.

MEDIA_TYPE_AUDIO_BOOK

const val MEDIA_TYPE_AUDIO_BOOK = 15: Int

MediaType for a group of items forming an audio book. Items in this group are typically of type MEDIA_TYPE_AUDIO_BOOK_CHAPTER.

MEDIA_TYPE_AUDIO_BOOK_CHAPTER

const val MEDIA_TYPE_AUDIO_BOOK_CHAPTER = 2: Int

MediaType for an audio book chapter.

MEDIA_TYPE_FOLDER_ALBUMS

const val MEDIA_TYPE_FOLDER_ALBUMS = 21: Int

MediaType for a folder containing albums.

MEDIA_TYPE_FOLDER_ARTISTS

const val MEDIA_TYPE_FOLDER_ARTISTS = 22: Int

MediaType for a folder containing artists.

MEDIA_TYPE_FOLDER_AUDIO_BOOKS

const val MEDIA_TYPE_FOLDER_AUDIO_BOOKS = 26: Int

MediaType for a folder containing audio books.

MEDIA_TYPE_FOLDER_GENRES

const val MEDIA_TYPE_FOLDER_GENRES = 23: Int

MediaType for a folder containing genres.

MEDIA_TYPE_FOLDER_MIXED

const val MEDIA_TYPE_FOLDER_MIXED = 20: Int

MediaType for a folder with mixed or undetermined content.

MEDIA_TYPE_FOLDER_MOVIES

const val MEDIA_TYPE_FOLDER_MOVIES = 35: Int

MediaType for a folder containing movies.

MEDIA_TYPE_FOLDER_NEWS

const val MEDIA_TYPE_FOLDER_NEWS = 32: Int

MediaType for a folder containing news.

MEDIA_TYPE_FOLDER_PLAYLISTS

const val MEDIA_TYPE_FOLDER_PLAYLISTS = 24: Int

MediaType for a folder containing playlists.

MEDIA_TYPE_FOLDER_PODCASTS

const val MEDIA_TYPE_FOLDER_PODCASTS = 27: Int

MediaType for a folder containing podcasts.

MEDIA_TYPE_FOLDER_RADIO_STATIONS

const val MEDIA_TYPE_FOLDER_RADIO_STATIONS = 31: Int

MediaType for a folder containing radio stations.

MEDIA_TYPE_FOLDER_TRAILERS

const val MEDIA_TYPE_FOLDER_TRAILERS = 34: Int

MediaType for a folder containing movie trailers.

MEDIA_TYPE_FOLDER_TV_CHANNELS

const val MEDIA_TYPE_FOLDER_TV_CHANNELS = 28: Int

MediaType for a folder containing TV channels.

MEDIA_TYPE_FOLDER_TV_SERIES

const val MEDIA_TYPE_FOLDER_TV_SERIES = 29: Int

MediaType for a folder containing TV series.

MEDIA_TYPE_FOLDER_TV_SHOWS

const val MEDIA_TYPE_FOLDER_TV_SHOWS = 30: Int

MediaType for a folder containing TV shows.

MEDIA_TYPE_FOLDER_VIDEOS

const val MEDIA_TYPE_FOLDER_VIDEOS = 33: Int

MediaType for a folder containing videos.

MEDIA_TYPE_FOLDER_YEARS

const val MEDIA_TYPE_FOLDER_YEARS = 25: Int

MediaType for a folder containing years.

MEDIA_TYPE_GENRE

const val MEDIA_TYPE_GENRE = 12: Int

MediaType for a group of items (e.g., music) of the same genre.

MEDIA_TYPE_MIXED

const val MEDIA_TYPE_MIXED = 0: Int

Media of undetermined type or a mix of multiple media types.

MEDIA_TYPE_MOVIE

const val MEDIA_TYPE_MOVIE = 8: Int

MediaType for a movie.

MEDIA_TYPE_MUSIC

const val MEDIA_TYPE_MUSIC = 1: Int

MediaType for music.

MEDIA_TYPE_NEWS

const val MEDIA_TYPE_NEWS = 5: Int

MediaType for news.

MEDIA_TYPE_PLAYLIST

const val MEDIA_TYPE_PLAYLIST = 13: Int

MediaType for a group of items (e.g., music) forming a playlist.

MEDIA_TYPE_PODCAST

const val MEDIA_TYPE_PODCAST = 16: Int

MediaType for a group of items belonging to a podcast. Items in this group are typically of type MEDIA_TYPE_PODCAST_EPISODE.

MEDIA_TYPE_PODCAST_EPISODE

const val MEDIA_TYPE_PODCAST_EPISODE = 3: Int

MediaType for a podcast episode.

MEDIA_TYPE_RADIO_STATION

const val MEDIA_TYPE_RADIO_STATION = 4: Int

MediaType for a radio station.

MEDIA_TYPE_TRAILER

const val MEDIA_TYPE_TRAILER = 7: Int

MediaType for a movie trailer.

MEDIA_TYPE_TV_CHANNEL

const val MEDIA_TYPE_TV_CHANNEL = 17: Int

MediaType for a group of items that are part of a TV channel. Items in this group are typically of type MEDIA_TYPE_TV_SHOW, MEDIA_TYPE_TV_SERIES or MEDIA_TYPE_MOVIE.

MEDIA_TYPE_TV_SEASON

const val MEDIA_TYPE_TV_SEASON = 19: Int

MediaType for a group of items that are part of a TV series. Items in this group are typically of type MEDIA_TYPE_TV_SHOW.

MEDIA_TYPE_TV_SERIES

const val MEDIA_TYPE_TV_SERIES = 18: Int

MediaType for a group of items that are part of a TV series. Items in this group are typically of type MEDIA_TYPE_TV_SHOW or MEDIA_TYPE_TV_SEASON.

MEDIA_TYPE_TV_SHOW

const val MEDIA_TYPE_TV_SHOW = 9: Int

MediaType for a TV show.

MEDIA_TYPE_VIDEO

const val MEDIA_TYPE_VIDEO = 6: Int

MediaType for a video.

MEDIA_TYPE_YEAR

const val MEDIA_TYPE_YEAR = 14: Int

MediaType for a group of items (e.g., music) from the same year.

PICTURE_TYPE_ARTIST_PERFORMER

const val PICTURE_TYPE_ARTIST_PERFORMER = 8: Int

PICTURE_TYPE_A_BRIGHT_COLORED_FISH

const val PICTURE_TYPE_A_BRIGHT_COLORED_FISH = 17: Int

PICTURE_TYPE_BACK_COVER

const val PICTURE_TYPE_BACK_COVER = 4: Int

PICTURE_TYPE_BAND_ARTIST_LOGO

const val PICTURE_TYPE_BAND_ARTIST_LOGO = 19: Int

PICTURE_TYPE_BAND_ORCHESTRA

const val PICTURE_TYPE_BAND_ORCHESTRA = 10: Int

PICTURE_TYPE_COMPOSER

const val PICTURE_TYPE_COMPOSER = 11: Int

PICTURE_TYPE_CONDUCTOR

const val PICTURE_TYPE_CONDUCTOR = 9: Int

PICTURE_TYPE_DURING_PERFORMANCE

const val PICTURE_TYPE_DURING_PERFORMANCE = 15: Int

PICTURE_TYPE_DURING_RECORDING

const val PICTURE_TYPE_DURING_RECORDING = 14: Int

PICTURE_TYPE_FILE_ICON

const val PICTURE_TYPE_FILE_ICON = 1: Int

PICTURE_TYPE_FILE_ICON_OTHER

const val PICTURE_TYPE_FILE_ICON_OTHER = 2: Int

PICTURE_TYPE_FRONT_COVER

const val PICTURE_TYPE_FRONT_COVER = 3: Int

PICTURE_TYPE_ILLUSTRATION

const val PICTURE_TYPE_ILLUSTRATION = 18: Int

PICTURE_TYPE_LEAD_ARTIST_PERFORMER

const val PICTURE_TYPE_LEAD_ARTIST_PERFORMER = 7: Int

PICTURE_TYPE_LEAFLET_PAGE

const val PICTURE_TYPE_LEAFLET_PAGE = 5: Int

PICTURE_TYPE_LYRICIST

const val PICTURE_TYPE_LYRICIST = 12: Int

PICTURE_TYPE_MEDIA

const val PICTURE_TYPE_MEDIA = 6: Int

PICTURE_TYPE_MOVIE_VIDEO_SCREEN_CAPTURE

const val PICTURE_TYPE_MOVIE_VIDEO_SCREEN_CAPTURE = 16: Int

PICTURE_TYPE_OTHER

const val PICTURE_TYPE_OTHER = 0: Int

PICTURE_TYPE_PUBLISHER_STUDIO_LOGO

const val PICTURE_TYPE_PUBLISHER_STUDIO_LOGO = 20: Int

PICTURE_TYPE_RECORDING_LOCATION

const val PICTURE_TYPE_RECORDING_LOCATION = 13: Int

Public functions

buildUpon

fun buildUpon(): MediaMetadata.Builder!

Returns a new Builder instance with the current MediaMetadata fields.

equals

fun equals(obj: Any?): Boolean

Note: Equality checking does not consider extras.

fromBundle

@UnstableApi
java-static fun fromBundle(bundle: Bundle!): MediaMetadata!

Restores a MediaMetadata from a Bundle.

hashCode

fun hashCode(): Int

toBundle

@UnstableApi
fun toBundle(): Bundle!

Returns a Bundle representing the information stored in this object.

Public properties

albumArtist

val albumArtistCharSequence?

Optional album artist.

albumTitle

val albumTitleCharSequence?

Optional album title.

artist

val artistCharSequence?

Optional artist.

artworkData

val artworkDataByteArray<Byte>?

Optional artwork data as a compressed byte array.

artworkDataType

@MediaMetadata.PictureType
val artworkDataType: @MediaMetadata.PictureType Int?

Optional PictureType of the artwork data.

artworkUri

val artworkUriUri?

Optional artwork Uri.

compilation

val compilationCharSequence?

Optional compilation.

composer

val composerCharSequence?

Optional composer.

conductor

val conductorCharSequence?

Optional conductor.

description

val descriptionCharSequence?

Optional description.

discNumber

val discNumberInt?

Optional disc number.

displayTitle

val displayTitleCharSequence?

Optional display title.

extras

val extrasBundle?

Optional extras Bundle.

Given the complexities of checking the equality of two Bundle instances, the contents of these extras are not considered in the equals and hashCode implementation.

folderType

@MediaMetadata.FolderType
val folderType: @MediaMetadata.FolderType Int?

Optional FolderType.

genre

val genreCharSequence?

Optional genre.

isBrowsable

val isBrowsableBoolean?

Optional boolean to indicate that the media is a browsable folder.

isPlayable

val isPlayableBoolean?

Optional boolean to indicate that the media is playable.

overallRating

val overallRatingRating?

Optional overall Rating.

recordingDay

val recordingDayInt?

Optional day of the recording date.

Note that there is no guarantee that the month and day are a valid combination.

recordingMonth

val recordingMonthInt?

Optional month of the recording date.

Note that there is no guarantee that the month and day are a valid combination.

recordingYear

val recordingYearInt?

Optional year of the recording date.

releaseDay

val releaseDayInt?

Optional day of the release date.

Note that there is no guarantee that the month and day are a valid combination.

releaseMonth

val releaseMonthInt?

Optional month of the release date.

Note that there is no guarantee that the month and day are a valid combination.

releaseYear

val releaseYearInt?

Optional year of the release date.

station

val stationCharSequence?

Optional name of the station streaming the media.

subtitle

val subtitleCharSequence?

Optional subtitle.

This is the secondary title of the media, unrelated to closed captions.

title

val titleCharSequence?

Optional title.

totalDiscCount

val totalDiscCountInt?

Optional total number of discs.

totalTrackCount

val totalTrackCountInt?

Optional total number of tracks.

trackNumber

val trackNumberInt?

Optional track number.

userRating

val userRatingRating?

Optional user Rating.

writer

val writerCharSequence?

Optional writer.

year

@UnstableApi
val yearInt?