MediaBrowser

public class MediaBrowser
extends MediaController

java.lang.Object
   ↳ androidx.media2.session.MediaController
     ↳ androidx.media2.session.MediaBrowser


Browses media content offered by a MediaLibraryService.

Summary

Nested classes

class MediaBrowser.BrowserCallback

Callback to listen events from MediaLibraryService

class MediaBrowser.Builder

Builder for MediaBrowser

Public methods

ListenableFuture<LibraryResult> getChildren(String parentId, int page, int pageSize, MediaLibraryService.LibraryParams params)

Gets the list of children under the parent.

ListenableFuture<LibraryResult> getItem(String mediaId)

Gets the media item with the given media id.

ListenableFuture<LibraryResult> getLibraryRoot(MediaLibraryService.LibraryParams params)

Gets the library root.

ListenableFuture<LibraryResult> getSearchResult(String query, int page, int pageSize, MediaLibraryService.LibraryParams params)

Gets the search result from the library service.

ListenableFuture<LibraryResult> search(String query, MediaLibraryService.LibraryParams params)

Sends a search request to the library service.

ListenableFuture<LibraryResult> subscribe(String parentId, MediaLibraryService.LibraryParams params)

Subscribes to a parent id for the change in its children.

ListenableFuture<LibraryResult> unsubscribe(String parentId)

Unsubscribes for changes to the children of the parent, which was previously subscribed with subscribe(String, LibraryParams).

Inherited methods