Google is committed to advancing racial equity for Black communities. See how.

MediaConstants

public class MediaConstants
extends Object

java.lang.Object
   ↳ androidx.media2.session.MediaConstants


Media constants for sharing constants between media provider and consumer apps

Summary

Constants

String MEDIA_URI_AUTHORITY

A Uri authority used in a media Uri.

String MEDIA_URI_PATH_PLAY_FROM_MEDIA_ID

A Uri path used by .MediaControllerCompat.TransportControls#playFromMediaId See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

String MEDIA_URI_PATH_PLAY_FROM_SEARCH

A Uri path used by .MediaControllerCompat.TransportControls#playFromSearch See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

String MEDIA_URI_PATH_PREPARE_FROM_MEDIA_ID

A Uri path used by .MediaControllerCompat.TransportControls#prepareFromMediaId See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

String MEDIA_URI_PATH_PREPARE_FROM_SEARCH

A Uri path used by .MediaControllerCompat.TransportControls#prepareFromSearch See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

String MEDIA_URI_QUERY_ID

A Uri query used by .MediaControllerCompat.TransportControls#prepareFromMediaId, and .TransportControls#playFromMediaId See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

String MEDIA_URI_QUERY_QUERY

A Uri query used by .MediaControllerCompat.TransportControls#prepareFromSearch, and .TransportControls#playFromSearch See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

String MEDIA_URI_SCHEME

A Uri scheme used in a media Uri.

Inherited methods

Constants

MEDIA_URI_AUTHORITY

public static final String MEDIA_URI_AUTHORITY

A Uri authority used in a media Uri. See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

Constant Value: "media2-session"

MEDIA_URI_PATH_PLAY_FROM_MEDIA_ID

public static final String MEDIA_URI_PATH_PLAY_FROM_MEDIA_ID

A Uri path used by .MediaControllerCompat.TransportControls#playFromMediaId See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

Constant Value: "playFromMediaId"

public static final String MEDIA_URI_PATH_PLAY_FROM_SEARCH

A Uri path used by .MediaControllerCompat.TransportControls#playFromSearch See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

Constant Value: "playFromSearch"

MEDIA_URI_PATH_PREPARE_FROM_MEDIA_ID

public static final String MEDIA_URI_PATH_PREPARE_FROM_MEDIA_ID

A Uri path used by .MediaControllerCompat.TransportControls#prepareFromMediaId See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

Constant Value: "prepareFromMediaId"

public static final String MEDIA_URI_PATH_PREPARE_FROM_SEARCH

A Uri path used by .MediaControllerCompat.TransportControls#prepareFromSearch See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

Constant Value: "prepareFromSearch"

MEDIA_URI_QUERY_ID

public static final String MEDIA_URI_QUERY_ID

A Uri query used by .MediaControllerCompat.TransportControls#prepareFromMediaId, and .TransportControls#playFromMediaId See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

Constant Value: "id"

MEDIA_URI_QUERY_QUERY

public static final String MEDIA_URI_QUERY_QUERY

A Uri query used by .MediaControllerCompat.TransportControls#prepareFromSearch, and .TransportControls#playFromSearch See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

Constant Value: "query"

MEDIA_URI_SCHEME

public static final String MEDIA_URI_SCHEME

A Uri scheme used in a media Uri. See MediaSession.SessionCallback.onSetMediaUri(MediaSession, MediaSession.ControllerInfo, Uri, Bundle) for more details.

Constant Value: "androidx"