Android 12 Developer Preview is here! Try it out, and give us your feedback!

BrowserCallback

open class BrowserCallback : MediaController.ControllerCallback
kotlin.Any
   ↳ androidx.media2.session.MediaController.ControllerCallback
   ↳ androidx.media2.session.MediaBrowser.BrowserCallback

Callback to listen events from MediaLibraryService.

Summary

Public constructors

Callback to listen events from MediaLibraryService.

Public methods
open Unit
onChildrenChanged(@NonNull browser: MediaBrowser, @NonNull parentId: String, @IntRange(0) itemCount: Int, @Nullable params: MediaLibraryService.LibraryParams?)

Called when there's change in the parent's children after you've subscribed to the parent with subscribe.

open Unit
onSearchResultChanged(@NonNull browser: MediaBrowser, @NonNull query: String, @IntRange(0) itemCount: Int, @Nullable params: MediaLibraryService.LibraryParams?)

Called when there's change in the search result requested by the previous MediaBrowser#search(String, LibraryParams).

Inherited functions