MediaBrowserExtras


class MediaBrowserExtras


Defines constants for extra keys in androidx.media.MediaBrowserServiceCompat.

Media apps can use these extras to enhance their analytics.

They can also take them into account to decide how many media items to return. For example, providing a number of recommendation items that is a multiple of the maximum number of items shown in a grid row will use the screen space more efficiently (avoiding blanks).

Summary

Constants

const String!
KEY_HINT_VIEW_MAX_CATEGORY_GRID_ITEMS_COUNT_PER_ROW = "androidx.car.app.mediaextensions.KEY_HINT_VIEW_MAX_CATEGORY_GRID_ITEMS_COUNT_PER_ROW"

Bundle key used in the options bundle passed to onLoadChildren or to onSearch to indicate how many media items tagged with DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_CATEGORY_GRID_ITEM are displayed on a single row.

const String!
KEY_HINT_VIEW_MAX_CATEGORY_LIST_ITEMS_COUNT_PER_ROW = "androidx.car.app.mediaextensions.KEY_HINT_VIEW_MAX_CATEGORY_LIST_ITEMS_COUNT_PER_ROW"

Bundle key used in the options bundle passed to onLoadChildren or to onSearch to indicate how many media items tagged with DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_CATEGORY_LIST_ITEM are displayed on a single row.

const String!
KEY_HINT_VIEW_MAX_GRID_ITEMS_COUNT_PER_ROW = "androidx.car.app.mediaextensions.KEY_HINT_VIEW_MAX_GRID_ITEMS_COUNT_PER_ROW"

Bundle key used in the options bundle passed to onLoadChildren or to onSearch to indicate how many media items tagged with DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_GRID_ITEM are displayed on a single row.

const String!
KEY_HINT_VIEW_MAX_ITEMS_WHILE_RESTRICTED = "androidx.car.app.mediaextensions.KEY_HINT_VIEW_MAX_ITEMS_WHILE_RESTRICTED"

Bundle key used in the options bundle passed to onLoadChildren or to onSearch to indicate the maximum number of returned items reachable under driving restrictions.

const String!
KEY_HINT_VIEW_MAX_LIST_ITEMS_COUNT_PER_ROW = "androidx.car.app.mediaextensions.KEY_HINT_VIEW_MAX_LIST_ITEMS_COUNT_PER_ROW"

Bundle key used in the options bundle passed to onLoadChildren or to onSearch to indicate how many media items tagged with DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_LIST_ITEM are displayed on a single row.

const String!
KEY_ROOT_HINT_MAX_QUEUE_ITEMS_WHILE_RESTRICTED = "androidx.car.app.mediaextensions.KEY_ROOT_HINT_MAX_QUEUE_ITEMS_WHILE_RESTRICTED"

Bundle key used in the rootHints bundle passed to onGetRoot to indicate the maximum number of queue items reachable under driving restrictions.

const String!
KEY_ROOT_HINT_MEDIA_HOST_VERSION = "androidx.car.app.mediaextensions.KEY_ROOT_HINT_MEDIA_HOST_VERSION"

Bundle key used in the rootHints bundle passed to onGetRoot to indicate the version of the caller.

const String!
KEY_ROOT_HINT_MEDIA_SESSION_API = "androidx.car.app.mediaextensions.KEY_ROOT_HINT_MEDIA_SESSION_API"

Bundle key used in the rootHints bundle passed to onGetRoot to indicate which version of the media api is used by the caller

Constants

KEY_HINT_VIEW_MAX_CATEGORY_GRID_ITEMS_COUNT_PER_ROW

Added in 1.7.0-beta02
const val KEY_HINT_VIEW_MAX_CATEGORY_GRID_ITEMS_COUNT_PER_ROW = "androidx.car.app.mediaextensions.KEY_HINT_VIEW_MAX_CATEGORY_GRID_ITEMS_COUNT_PER_ROW": String!

Bundle key used in the options bundle passed to onLoadChildren or to onSearch to indicate how many media items tagged with DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_CATEGORY_GRID_ITEM are displayed on a single row.

TYPE: int - maximum number of category grid items per row.

KEY_HINT_VIEW_MAX_CATEGORY_LIST_ITEMS_COUNT_PER_ROW

Added in 1.7.0-beta02
const val KEY_HINT_VIEW_MAX_CATEGORY_LIST_ITEMS_COUNT_PER_ROW = "androidx.car.app.mediaextensions.KEY_HINT_VIEW_MAX_CATEGORY_LIST_ITEMS_COUNT_PER_ROW": String!

Bundle key used in the options bundle passed to onLoadChildren or to onSearch to indicate how many media items tagged with DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_CATEGORY_LIST_ITEM are displayed on a single row.

TYPE: int - maximum number of category list items per row.

KEY_HINT_VIEW_MAX_GRID_ITEMS_COUNT_PER_ROW

Added in 1.7.0-beta02
const val KEY_HINT_VIEW_MAX_GRID_ITEMS_COUNT_PER_ROW = "androidx.car.app.mediaextensions.KEY_HINT_VIEW_MAX_GRID_ITEMS_COUNT_PER_ROW": String!

Bundle key used in the options bundle passed to onLoadChildren or to onSearch to indicate how many media items tagged with DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_GRID_ITEM are displayed on a single row.

TYPE: int - maximum number of grid items per row.

KEY_HINT_VIEW_MAX_ITEMS_WHILE_RESTRICTED

Added in 1.7.0-beta02
const val KEY_HINT_VIEW_MAX_ITEMS_WHILE_RESTRICTED = "androidx.car.app.mediaextensions.KEY_HINT_VIEW_MAX_ITEMS_WHILE_RESTRICTED": String!

Bundle key used in the options bundle passed to onLoadChildren or to onSearch to indicate the maximum number of returned items reachable under driving restrictions.

TYPE: int - the maximum number of items when restricted, -1 when unlimited

KEY_HINT_VIEW_MAX_LIST_ITEMS_COUNT_PER_ROW

Added in 1.7.0-beta02
const val KEY_HINT_VIEW_MAX_LIST_ITEMS_COUNT_PER_ROW = "androidx.car.app.mediaextensions.KEY_HINT_VIEW_MAX_LIST_ITEMS_COUNT_PER_ROW": String!

Bundle key used in the options bundle passed to onLoadChildren or to onSearch to indicate how many media items tagged with DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_LIST_ITEM are displayed on a single row.

TYPE: int - maximum number of list items per row.

KEY_ROOT_HINT_MAX_QUEUE_ITEMS_WHILE_RESTRICTED

Added in 1.7.0-beta02
const val KEY_ROOT_HINT_MAX_QUEUE_ITEMS_WHILE_RESTRICTED = "androidx.car.app.mediaextensions.KEY_ROOT_HINT_MAX_QUEUE_ITEMS_WHILE_RESTRICTED": String!

Bundle key used in the rootHints bundle passed to onGetRoot to indicate the maximum number of queue items reachable under driving restrictions. This sublist is centered around the currently playing item.

TYPE: int - the maximum number of queue items when restricted, -1 when unlimited

KEY_ROOT_HINT_MEDIA_HOST_VERSION

Added in 1.7.0-beta02
const val KEY_ROOT_HINT_MEDIA_HOST_VERSION = "androidx.car.app.mediaextensions.KEY_ROOT_HINT_MEDIA_HOST_VERSION": String!

Bundle key used in the rootHints bundle passed to onGetRoot to indicate the version of the caller. Note that this should only be used for analytics and is different than KEY_ROOT_HINT_MEDIA_SESSION_API.

TYPE: string - the version info.

KEY_ROOT_HINT_MEDIA_SESSION_API

Added in 1.7.0-beta02
const val KEY_ROOT_HINT_MEDIA_SESSION_API = "androidx.car.app.mediaextensions.KEY_ROOT_HINT_MEDIA_SESSION_API": String!

Bundle key used in the rootHints bundle passed to onGetRoot to indicate which version of the media api is used by the caller

TYPE: int - the media api level (1, 2, 3).