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"
|
static final String |
KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI = "androidx.car.app.mediaextensions.KEY_CONTENT_FORMAT_TINTABLE_SMALL_ICON_URI"
|
static final String |
KEY_DESCRIPTION_LINK_MEDIA_ID = "androidx.car.app.mediaextensions.KEY_DESCRIPTION_LINK_MEDIA_ID"
|
static final String |
KEY_EXCLUDE_MEDIA_ITEM_FROM_MIXED_APP_LIST = "androidx.car.app.mediaextensions.KEY_EXCLUDE_MEDIA_ITEM_FROM_MIXED_APP_LIST"
|
static final String |
KEY_IMMERSIVE_AUDIO = "androidx.car.app.mediaextensions.KEY_IMMERSIVE_AUDIO"
|
static final String |
KEY_SUBTITLE_LINK_MEDIA_ID = "androidx.car.app.mediaextensions.KEY_SUBTITLE_LINK_MEDIA_ID"
|
static final String |
KEY_TINTABLE_INDICATOR_ICON_URI_LIST = "androidx.car.app.mediaextensions.KEY_TINTABLE_INDICATOR_ICON_URI_LIST"
|
Constants
KEY_CONTENT_FORMAT_TINTABLE_LARGE_ICON_URI
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
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
KEY_DESCRIPTION_LINK_MEDIA_ID
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” // ArtistKEY_EXCLUDE_MEDIA_ITEM_FROM_MIXED_APP_LIST
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
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
KEY_SUBTITLE_LINK_MEDIA_ID
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 IDKEY_TINTABLE_INDICATOR_ICON_URI_LIST
public static final String KEY_TINTABLE_INDICATOR_ICON_URI_LIST = "androidx.car.app.mediaextensions.KEY_TINTABLE_INDICATOR_ICON_URI_LIST"
Bundle key used in the extras of a media item to indicate a list of tintable vector drawables where each drawable represents a property or a state of the media item. These drawables may be rendered in small views showing information about a media item, in an area roughly equivalent to 2 characters of the media item's subtitle.Note: when specifying this extra, the "android.media.extra.DOWNLOAD_STATUS" and "android.media.IS_EXPLICIT" extras will be ignored, so 3p apps should add their own downloaded and explicit icon uris to this extra's list. This way all these icons can use the same drawing style.
TYPE: ArrayList<Uri>, list of Uris - with each uri pointing to local content using either ContentResolver.SCHEME_CONTENT or ContentResolver.SCHEME_ANDROID_RESOURCE (ie not on the web) that can be parsed into a android.graphics.drawable.Drawable