public final class

MediaBrowserServiceCompat.BrowserRoot

extends java.lang.Object

 java.lang.Object

↳androidx.media.MediaBrowserServiceCompat.BrowserRoot

Overview

Contains information that the browser service needs to send to the client when first connected.

Summary

Fields
public static final java.lang.StringEXTRA_OFFLINE

The lookup key for a boolean that indicates whether the browser service should return a browser root for offline media items.

public static final java.lang.StringEXTRA_RECENT

The lookup key for a boolean that indicates whether the browser service should return a browser root for recently played media items.

public static final java.lang.StringEXTRA_SUGGESTED

The lookup key for a boolean that indicates whether the browser service should return a browser root for suggested media items.

public static final java.lang.StringEXTRA_SUGGESTION_KEYWORDS

The lookup key for a string that indicates specific keywords which will be considered when the browser service suggests media items.

Constructors
publicBrowserRoot(java.lang.String rootId, Bundle extras)

Constructs a browser root.

Methods
public BundlegetExtras()

Gets any extras about the browser service.

public java.lang.StringgetRootId()

Gets the root id for browsing.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final java.lang.String EXTRA_RECENT

The lookup key for a boolean that indicates whether the browser service should return a browser root for recently played media items.

When creating a media browser for a given media browser service, this key can be supplied as a root hint for retrieving media items that are recently played. If the media browser service can provide such media items, the implementation must return the key in the root hint when MediaBrowserServiceCompat.onGetRoot(String, int, Bundle) is called back.

The root hint may contain multiple keys.

See also: MediaBrowserServiceCompat.BrowserRoot.EXTRA_OFFLINE, MediaBrowserServiceCompat.BrowserRoot.EXTRA_SUGGESTED

public static final java.lang.String EXTRA_OFFLINE

The lookup key for a boolean that indicates whether the browser service should return a browser root for offline media items.

When creating a media browser for a given media browser service, this key can be supplied as a root hint for retrieving media items that are can be played without an internet connection. If the media browser service can provide such media items, the implementation must return the key in the root hint when MediaBrowserServiceCompat.onGetRoot(String, int, Bundle) is called back.

The root hint may contain multiple keys.

See also: MediaBrowserServiceCompat.BrowserRoot.EXTRA_RECENT, MediaBrowserServiceCompat.BrowserRoot.EXTRA_SUGGESTED

public static final java.lang.String EXTRA_SUGGESTED

The lookup key for a boolean that indicates whether the browser service should return a browser root for suggested media items.

When creating a media browser for a given media browser service, this key can be supplied as a root hint for retrieving the media items suggested by the media browser service. The list of media items passed in is considered ordered by relevance, first being the top suggestion. If the media browser service can provide such media items, the implementation must return the key in the root hint when MediaBrowserServiceCompat.onGetRoot(String, int, Bundle) is called back.

The root hint may contain multiple keys.

See also: MediaBrowserServiceCompat.BrowserRoot.EXTRA_RECENT, MediaBrowserServiceCompat.BrowserRoot.EXTRA_OFFLINE

public static final java.lang.String EXTRA_SUGGESTION_KEYWORDS

Deprecated: The search functionality is now supported by the methods search and MediaBrowserServiceCompat.onSearch(String, Bundle, MediaBrowserServiceCompat.Result>). Use those methods instead.

The lookup key for a string that indicates specific keywords which will be considered when the browser service suggests media items.

When creating a media browser for a given media browser service, this key can be supplied as a root hint together with MediaBrowserServiceCompat.BrowserRoot.EXTRA_SUGGESTED for retrieving suggested media items related with the keywords. The list of media items passed in is considered ordered by relevance, first being the top suggestion. If the media browser service can provide such media items, the implementation must return the key in the root hint when MediaBrowserServiceCompat.onGetRoot(String, int, Bundle) is called back.

The root hint may contain multiple keys.

See also: MediaBrowserServiceCompat.BrowserRoot.EXTRA_RECENT, MediaBrowserServiceCompat.BrowserRoot.EXTRA_OFFLINE, MediaBrowserServiceCompat.BrowserRoot.EXTRA_SUGGESTED

Constructors

public BrowserRoot(java.lang.String rootId, Bundle extras)

Constructs a browser root.

Parameters:

rootId: The root id for browsing.
extras: Any extras about the browser service.

Methods

public java.lang.String getRootId()

Gets the root id for browsing.

public Bundle getExtras()

Gets any extras about the browser service.