Android 12 Developer Preview is here! Try it out, and give us your feedback!

MediaConstants

class MediaConstants
kotlin.Any
   ↳ androidx.media.utils.MediaConstants

Media constants for sharing constants between media provider and consumer apps

Summary

Constants
static String

Bundle key passed through root hints to the MediaBrowserServiceCompat to indicate the recommended size, in pixels, for media art bitmaps.

static String

Bundle key passed through root hints to the MediaBrowserServiceCompat to indicate the maximum number of children of the root node that can be supported by the hosting .

static String

Bundle key passed through root hints to the MediaBrowserServiceCompat to indicate which flags exposed by MediaBrowserCompat.MediaItem#getFlags() from children of the root node are supported by the hosting MediaBrowserCompat.

static String

Bundle key sent through MediaBrowserCompat#getExtras() to the hosting to indicate that the MediaBrowserServiceCompat supports the method MediaBrowserServiceCompat#onSearch(String, Bundle, * MediaBrowserServiceCompat.Result).

static String

Bundle key sent through MediaDescriptionCompat#getExtras() to the hosting to indicate the playback completion status of the corresponding .

static String

Bundle key passed from the MediaBrowserServiceCompat to the hosting to indicate a preference about how browsable instances of are presented.

static String

Bundle key sent through MediaDescriptionCompat#getExtras() to the hosting to indicate that certain instances of are related as a group, with a title that is specified through the bundle value.

static String

Bundle key passed from the MediaBrowserServiceCompat to the hosting to indicate a preference about how playable instances of are presented.

static Int

Bundle value sent through MediaDescriptionCompat#getExtras() to the hosting to indicate that the corresponding MediaBrowserCompat.MediaItem has been fully played by the user.

static Int

Bundle value sent through MediaDescriptionCompat#getExtras() to the hosting to indicate that the corresponding MediaBrowserCompat.MediaItem has not been played by the user.

static Int

Bundle value sent through MediaDescriptionCompat#getExtras() to the hosting to indicate that the corresponding MediaBrowserCompat.MediaItem has been partially played by the user.

static Int

Bundle value passed from the MediaBrowserServiceCompat to the hosting to indicate a preference that browsable instances of should be presented as "category" grid items.

static Int

Bundle value passed from the MediaBrowserServiceCompat to the hosting to indicate a preference that browsable instances of should be presented as "category" list items.

static Int

Bundle value passed from the MediaBrowserServiceCompat to the hosting to indicate a preference that certain instances of should be presented as grid items.

static Int

Bundle value passed from the MediaBrowserServiceCompat to the hosting to indicate a preference that certain instances of should be presented as list items.

static String

Bundle key used for media content id in metadata, should contain the same ID provided to Media Actions Catalog in reference to this title (e.g., episode, movie).

static String

Key sent through a key-value mapping in MediaMetadataCompat#getLong(String) or in the MediaDescriptionCompat#getExtras() bundle to the hosting MediaBrowserCompat to indicate that the corresponding MediaMetadataCompat or is an advertisement.

static String

Key sent through a key-value mapping in MediaMetadataCompat#getLong(String) or in the MediaDescriptionCompat#getExtras() bundle to the hosting MediaBrowserCompat to indicate that the corresponding MediaMetadataCompat or has explicit content (i.e. user discretion is advised when viewing or listening to this content).

static Long

Value sent through a key-value mapping of MediaMetadataCompat, or through extras on a different data type, to indicate the presence of an attribute described by its corresponding key.

static String

Bundle key passed through PlaybackStateCompat#getExtras() to the hosting which maps to a pending intent.

static String

Bundle key passed through PlaybackStateCompat#getExtras() to the hosting which maps to a label.

static String

Bundle key used for the media id in playback state extras.

static String

Bundle key used for the account name in session extras.

static String

Bundle key used for the account type in session extras.

static String

Bundle key passed from MediaSessionCompat to the hosting to indicate a preference that a region of space for the skip to next control should always be blocked out in the UI, even when the is not supported.

static String

Bundle key passed from MediaSessionCompat to the hosting to indicate a preference that a region of space for the skip to previous control should always be blocked out in the UI, even when the is not supported.

Constants

BROWSER_ROOT_HINTS_KEY_MEDIA_ART_SIZE_PIXELS

static