MediaConstants

Added in 1.2.0
Deprecated in 1.8.0

public final class MediaConstants


Media constants for sharing constants between media provider and consumer apps.

Summary

Constants

static final String
BROWSER_ROOT_HINTS_KEY_CUSTOM_BROWSER_ACTION_LIMIT = "androidx.media.utils.MediaBrowserCompat.extras.CUSTOM_BROWSER_ACTION_LIMIT"

Bundle key used to define the total number of actions allowed per item.

static final String
BROWSER_ROOT_HINTS_KEY_MEDIA_ART_SIZE_PIXELS = "android.media.extras.MEDIA_ART_SIZE_HINT_PIXELS"

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

static final String
BROWSER_ROOT_HINTS_KEY_ROOT_CHILDREN_LIMIT = "androidx.media.MediaBrowserCompat.Extras.KEY_ROOT_CHILDREN_LIMIT"

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 MediaBrowserCompat.

static final String
BROWSER_ROOT_HINTS_KEY_ROOT_CHILDREN_SUPPORTED_FLAGS = "androidx.media.MediaBrowserCompat.Extras.KEY_ROOT_CHILDREN_SUPPORTED_FLAGS"

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

static final String
BROWSER_SERVICE_EXTRAS_KEY_APPLICATION_PREFERENCES_USING_CAR_APP_LIBRARY_INTENT = "androidx.media.BrowserRoot.Extras.APPLICATION_PREFERENCES_USING_CAR_APP_LIBRARY_INTENT"

Bundle key used to indicate that the MediaBrowserServiceCompat supports showing a settings page.

static final String
BROWSER_SERVICE_EXTRAS_KEY_CUSTOM_BROWSER_ACTION_ROOT_LIST = "androidx.media.utils.extras.CUSTOM_BROWSER_ACTION_ROOT_LIST"

Bundle key used to store supported custom browser actions for media browsers that support custom browser actions.

static final String
BROWSER_SERVICE_EXTRAS_KEY_FAVORITES_MEDIA_ITEM = "androidx.media.BrowserRoot.Extras.FAVORITES_MEDIA_ITEM"

Bundle key used to pass a browseable android.media.browse.MediaBrowser.MediaItem that represents 'Favorite' content or some other notion of preset/pinned content.

static final String
BROWSER_SERVICE_EXTRAS_KEY_SEARCH_SUPPORTED = "android.media.browse.SEARCH_SUPPORTED"

Bundle key sent through getExtras to the hosting MediaBrowserCompat to indicate that the MediaBrowserServiceCompat supports the method onSearch.

static final String
DESCRIPTION_EXTRAS_KEY_COMPLETION_PERCENTAGE = "androidx.media.MediaItem.Extras.COMPLETION_PERCENTAGE"

Bundle key sent through getExtras to the hosting MediaBrowserCompat to indicate an amount of completion progress for the corresponding MediaBrowserCompat.MediaItem.

static final String
DESCRIPTION_EXTRAS_KEY_COMPLETION_STATUS = "android.media.extra.PLAYBACK_STATUS"

Bundle key sent through getExtras to the hosting MediaBrowserCompat to indicate the playback completion status of the corresponding MediaBrowserCompat.MediaItem.

static final String
DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_BROWSABLE = "android.media.browse.CONTENT_STYLE_BROWSABLE_HINT"

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

static final String
DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_GROUP_TITLE = "android.media.browse.CONTENT_STYLE_GROUP_TITLE_HINT"

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

static final String
DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_PLAYABLE = "android.media.browse.CONTENT_STYLE_PLAYABLE_HINT"

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

static final String
DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_SINGLE_ITEM = "android.media.browse.CONTENT_STYLE_SINGLE_ITEM_HINT"

Bundle key sent through getExtras to the hosting MediaBrowserCompat to indicate a preference about how the corresponding MediaBrowserCompat.MediaItem is presented.

static final String
DESCRIPTION_EXTRAS_KEY_CUSTOM_BROWSER_ACTION_ID_LIST = "androidx.media.utils.extras.CUSTOM_BROWSER_ACTION_ID_LIST"

Bundle key used to define a string list of custom browser actions for a MediaBrowserCompat.MediaItem. e.g. "download","favorite","add to queue"

static final int

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

static final int

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

static final int

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

static final int

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

static final int

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

static final int

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

static final int

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

static final String
EXTRAS_KEY_CUSTOM_BROWSER_ACTION_EXTRAS = "androidx.media.utils.extras.KEY_CUSTOM_BROWSER_ACTION_EXTRAS"

Bundle key used to define an extras bundle for a custom browser action.

static final String
EXTRAS_KEY_CUSTOM_BROWSER_ACTION_ICON_URI = "androidx.media.utils.extras.KEY_CUSTOM_BROWSER_ACTION_ICON_URI"

Bundle key used to define the icon URI for a custom browser action.

static final String
EXTRAS_KEY_CUSTOM_BROWSER_ACTION_ID = "androidx.media.utils.extras.KEY_CUSTOM_BROWSER_ACTION_ID"

Bundle key used to define the ID for a custom browser action.

static final String
EXTRAS_KEY_CUSTOM_BROWSER_ACTION_LABEL = "androidx.media.utils.extras.KEY_CUSTOM_BROWSER_ACTION_LABEL"

Bundle key used to define the label for a custom browser action.

static final String
EXTRAS_KEY_CUSTOM_BROWSER_ACTION_MEDIA_ITEM_ID = "androidx.media.utils.extras.KEY_CUSTOM_BROWSER_ACTION_MEDIA_ITEM_ID"

Bundle key used to define the ID of the MediaBrowserCompat.MediaItem associated with the invoked action.

static final String
EXTRAS_KEY_CUSTOM_BROWSER_ACTION_RESULT_BROWSE_NODE = "androidx.media.utils.extras.KEY_CUSTOM_BROWSER_ACTION_RESULT_BROWSE_NODE"

Bundle key set in MediaBrowserServiceCompat.Result to indicate which browse node should be displayed next.

static final String
EXTRAS_KEY_CUSTOM_BROWSER_ACTION_RESULT_MESSAGE = "androidx.media.utils.extras.KEY_CUSTOM_BROWSER_ACTION_RESULT_MESSAGE"

Bundle key set in MediaBrowserServiceCompat.Result to set a message for the user.

static final String
EXTRAS_KEY_CUSTOM_BROWSER_ACTION_RESULT_REFRESH_ITEM = "androidx.media.utils.extras.KEY_CUSTOM_BROWSER_ACTION_RESULT_REFRESH_ITEM"

Bundle key set in MediaBrowserServiceCompat.Result to refresh a MediaBrowserCompat.MediaItem in the browse tree.

static final String
EXTRAS_KEY_CUSTOM_BROWSER_ACTION_RESULT_SHOW_PLAYING_ITEM = "androidx.media.utils.extras.KEY_CUSTOM_BROWSER_ACTION_RESULT_SHOW_PLAYING_ITEM"

Bundle key set in MediaBrowserServiceCompat.Result to show the currently playing item.

static final String
METADATA_KEY_CONTENT_ID = "androidx.media.MediaMetadatCompat.METADATA_KEY_CONTENT_ID"

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 final String
METADATA_KEY_IS_ADVERTISEMENT = "android.media.metadata.ADVERTISEMENT"

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

static final String
METADATA_KEY_IS_EXPLICIT = "android.media.IS_EXPLICIT"

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

static final String
METADATA_KEY_NEXT_EPISODE_CONTENT_ID = "androidx.media.MediaMetadatCompat.METADATA_KEY_NEXT_EPISODE_CONTENT_ID"

Bundle key used for next episode's media content ID in metadata, following the same ID and format provided to Media Actions Catalog in reference to the next episode of the current title episode.

static final String
METADATA_KEY_SERIES_CONTENT_ID = "androidx.media.MediaMetadatCompat.METADATA_KEY_SERIES_CONTENT_ID"

Bundle key used for the TV series's media content ID in metadata, following the same ID and format provided to Media Actions Catalog in reference to the TV series of the current title episode.

static final long

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

static final String
PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_INTENT = "android.media.extras.ERROR_RESOLUTION_ACTION_INTENT"

Bundle key passed through getExtras to the hosting MediaControllerCompat which maps to a pending intent.

static final String
PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_LABEL = "android.media.extras.ERROR_RESOLUTION_ACTION_LABEL"

Bundle key passed through getExtras to the hosting MediaControllerCompat which maps to a label.

static final String
PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_USING_CAR_APP_LIBRARY_INTENT = "androidx.media.PlaybackStateCompat.Extras.ERROR_RESOLUTION_USING_CAR_APP_LIBRARY_INTENT"

Bundle key passed through getExtras to the MediaControllerCompat which maps to a PendingIntent.

static final String
PLAYBACK_STATE_EXTRAS_KEY_MEDIA_ID = "androidx.media.PlaybackStateCompat.Extras.KEY_MEDIA_ID"

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

static final String
SESSION_EXTRAS_KEY_ACCOUNT_NAME = "androidx.media.MediaSessionCompat.Extras.KEY_ACCOUNT_NAME"

Bundle key used for the account name in session extras.

static final String
SESSION_EXTRAS_KEY_ACCOUNT_TYPE = "androidx.media.MediaSessionCompat.Extras.KEY_ACCOUNT_TYPE"

Bundle key used for the account type in session extras.

static final String
SESSION_EXTRAS_KEY_SLOT_RESERVATION_SKIP_TO_NEXT = "android.media.playback.ALWAYS_RESERVE_SPACE_FOR.ACTION_SKIP_TO_NEXT"

Bundle key passed from MediaSessionCompat to the hosting MediaControllerCompat 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 skip to next standard action is not supported.

static final String
SESSION_EXTRAS_KEY_SLOT_RESERVATION_SKIP_TO_PREV = "android.media.playback.ALWAYS_RESERVE_SPACE_FOR.ACTION_SKIP_TO_PREVIOUS"

Bundle key passed from MediaSessionCompat to the hosting MediaControllerCompat 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 skip to previous standard action is not supported.

static final String
TRANSPORT_CONTROLS_EXTRAS_KEY_LEGACY_STREAM_TYPE = "android.media.session.extra.LEGACY_STREAM_TYPE"

Bundle key passed through the extras of prepareFromMediaId, prepareFromSearch, prepareFromUri, playFromMediaId, playFromSearch, or playFromUri to indicate the stream type to be used by the session when playing or preparing the media.

static final String
TRANSPORT_CONTROLS_EXTRAS_KEY_SHUFFLE = "androidx.media.MediaControllerCompat.TransportControls.extras.KEY_SHUFFLE"

Bundle key passed through the extras of prepareFromMediaId, prepareFromSearch, prepareFromUri, playFromMediaId, playFromSearch, or playFromUri to indicate whether the session should shuffle the media to be played or not.

Constants

BROWSER_ROOT_HINTS_KEY_CUSTOM_BROWSER_ACTION_LIMIT

Added in 1.7.0
Deprecated in 1.8.0
public static final String BROWSER_ROOT_HINTS_KEY_CUSTOM_BROWSER_ACTION_LIMIT = "androidx.media.utils.MediaBrowserCompat.extras.CUSTOM_BROWSER_ACTION_LIMIT"

Bundle key used to define the total number of actions allowed per item. Passed to MediaBrowserServiceCompat using onGetRoot in root hints bundle.

Presence of this key and positive value in the root hints indicates that custom browse actions feature is supported. Actions beyond this limit will be truncated.

TYPE: int, number of actions each item is limited to.

BROWSER_ROOT_HINTS_KEY_MEDIA_ART_SIZE_PIXELS

Added in 1.3.0
Deprecated in 1.8.0
public static final String BROWSER_ROOT_HINTS_KEY_MEDIA_ART_SIZE_PIXELS = "android.media.extras.MEDIA_ART_SIZE_HINT_PIXELS"

Bundle key passed through root hints to the MediaBrowserServiceCompat to indicate the recommended size, in pixels, for media art bitmaps. Much smaller images may not render well, and much larger images may cause inefficient resource consumption.

BROWSER_ROOT_HINTS_KEY_ROOT_CHILDREN_LIMIT

Added in 1.3.0
Deprecated in 1.8.0
public static final String BROWSER_ROOT_HINTS_KEY_ROOT_CHILDREN_LIMIT = "androidx.media.MediaBrowserCompat.Extras.KEY_ROOT_CHILDREN_LIMIT"

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 MediaBrowserCompat. Excess root children may be omitted or made less discoverable by the host.

TYPE: int