MetadataExtras


public final class MetadataExtras


Defines constants for extra keys in android.support.v4.media.MediaMetadataCompat or androidx.media3.common.MediaMetadata.

Summary

Constants

static final String
KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI = "androidx.car.app.mediaextensions.KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI"

Bundle key used in the extras of a media item to indicate a tintable vector drawable representing its content format.

static final String
KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI = "androidx.car.app.mediaextensions.KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI"

Bundle key used in the extras of a media item to indicate a tintable vector drawable representing its content format.

static final String
KEY_DESCRIPTION_LINK_MEDIA_ID = "androidx.car.app.mediaextensions.KEY_DESCRIPTION_LINK_MEDIA_ID"

Bundle key used in the extras of a media item to indicate that the description of the corresponding media item can be linked to another media item ID.

static final String
KEY_EXCLUDE_MEDIA_ITEM_FROM_MIXED_APP_LIST = "androidx.car.app.mediaextensions.KEY_EXCLUDE_MEDIA_ITEM_FROM_MIXED_APP_LIST"

Bundle key used in the extras of a media item to indicate that the metadata of this media item should not be shown next to content from other applications

static final String
KEY_IMMERSIVE_AUDIO = "androidx.car.app.mediaextensions.KEY_IMMERSIVE_AUDIO"

Bundle key used in the extras of a media item to indicate an immersive audio experience.

static final String
KEY_SUBTITLE_LINK_MEDIA_ID = "androidx.car.app.mediaextensions.KEY_SUBTITLE_LINK_MEDIA_ID"

Bundle key used in the extras of a media item to indicate that the subtitle of the corresponding media item can be linked to another media item ID.

Constants

KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI

Added in 1.4.0
public static final String KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI = "androidx.car.app.mediaextensions.KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI"

Bundle key used in the extras of a media item to indicate a tintable vector drawable representing its content format. This drawable must be rendered in large views showing information about the currently playing media item, in an area roughly equivalent to 15 characters of subtitle.

TYPE: String - a uri pointing to local content (ie not on the web) that can be parsed into a android.graphics.drawable.Drawable

KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI

Added in 1.4.0
public static final String KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI = "androidx.car.app.mediaextensions.KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI"

Bundle key used in the extras of a media item to indicate a tintable vector drawable representing its content format. This drawable may be rendered in smaller views showing information about a media item, in an area roughly equivalent to 2 characters of subtitle.

TYPE: String - a uri pointing to local content (ie not on the web) that can be parsed into a android.graphics.drawable.Drawable

Added in 1.4.0
public static final String KEY_DESCRIPTION_LINK_MEDIA_ID = "androidx.car.app.mediaextensions.KEY_DESCRIPTION_LINK_MEDIA_ID"

Bundle key used in the extras of a media item to indicate that the description of the corresponding media item can be linked to another media item ID.

The value of the extra is set to the media ID of this other item.

NOTE: media1 and media3 apps setting this extra must implementonLoadItem or onGetItem respectively.

NOTE: media apps setting this extra must explicitly set the description property.

See METADATA_KEY_DISPLAY_DESCRIPTION

See description

TYPE: String.

Example:

  "Source" MediaItem
     + mediaId:                  “Beethoven-9th-symphony”    // ID
     + title:                    “9th symphony”              // Track
     + subtitle:                 “The best of Beethoven”     // Album
     + subtitleLinkMediaId:      “Beethoven-best-of”         // Album ID
     + description:              “Beethoven”                 // Artist
╔════+ descriptionLinkMediaId:   “artist:Beethoven”          // Artist ID
║
║ "Destination" MediaItem
╚════+ mediaId:                  “artist:Beethoven”          // ID
     + title:                    “Beethoven”                 // Artist

KEY_EXCLUDE_MEDIA_ITEM_FROM_MIXED_APP_LIST

Added in 1.7.0-beta03
public static final String KEY_EXCLUDE_MEDIA_ITEM_FROM_MIXED_APP_LIST = "androidx.car.app.mediaextensions.KEY_EXCLUDE_MEDIA_ITEM_FROM_MIXED_APP_LIST"

Bundle key used in the extras of a media item to indicate that the metadata of this media item should not be shown next to content from other applications

TYPE: long - to enable, use value METADATA_VALUE_ATTRIBUTE_PRESENT

KEY_IMMERSIVE_AUDIO

Added in 1.4.0
public static final String KEY_IMMERSIVE_AUDIO = "androidx.car.app.mediaextensions.KEY_IMMERSIVE_AUDIO"

Bundle key used in the extras of a media item to indicate an immersive audio experience. Car OEMs should carefully consider which audio effects should be enabled for such content.

TYPE: long - to enable, use value METADATA_VALUE_ATTRIBUTE_PRESENT

Added in 1.4.0
public static final String KEY_SUBTITLE_LINK_MEDIA_ID = "androidx.car.app.mediaextensions.KEY_SUBTITLE_LINK_MEDIA_ID"

Bundle key used in the extras of a media item to indicate that the subtitle of the corresponding media item can be linked to another media item ID.

The value of the extra is set to the media ID of this other item.

NOTE: media1 and media3 apps setting this extra must implementonLoadItem or onGetItem respectively.

NOTE: media apps setting this extra must explicitly set the subtitle property.

See METADATA_KEY_DISPLAY_SUBTITLE

See subtitle

TYPE: String.

Example:

  "Source" MediaItem
     + mediaId:                  “Beethoven-9th-symphony”    // ID
     + title:                    “9th symphony”              // Track
     + subtitle:                 “The best of Beethoven”     // Album
╔════+ subtitleLinkMediaId:      “Beethoven-best-of”         // Album ID
║    + description:              “Beethoven”                 // Artist
║    + descriptionLinkMediaId:   “artist:Beethoven”          // Artist ID
║
║ "Destination" MediaItem
╚════+ mediaId:                  “Beethoven-best-of”         // ID
     + title:                    “The best of Beethoven”     // Album
     + subtitle:                 “Beethoven”                 // Artist
     + subtitleLinkMediaId:      “artist:Beethoven”          // Artist ID