MediaBrowser.BrowserCallback
public
static
class
MediaBrowser.BrowserCallback
extends MediaController.ControllerCallback
java.lang.Object | ||
↳ | androidx.media2.session.MediaController.ControllerCallback | |
↳ | androidx.media2.session.MediaBrowser.BrowserCallback |
Callback to listen events from MediaLibraryService
.
Summary
Public constructors | |
---|---|
BrowserCallback()
|
Public methods | |
---|---|
void
|
onChildrenChanged(MediaBrowser browser, String parentId, int itemCount, MediaLibraryService.LibraryParams params)
Called when there's change in the parent's children after you've subscribed to the parent
with |
void
|
onSearchResultChanged(MediaBrowser browser, String query, int itemCount, MediaLibraryService.LibraryParams params)
Called when there's change in the search result requested by the previous
|
Inherited methods | |
---|---|
Public constructors
BrowserCallback
public BrowserCallback ()
Public methods
onChildrenChanged
public void onChildrenChanged (MediaBrowser browser, String parentId, int itemCount, MediaLibraryService.LibraryParams params)
Called when there's change in the parent's children after you've subscribed to the parent
with MediaBrowser.subscribe(String, MediaLibraryService.LibraryParams)
.
This API is called when the library service called
MediaLibraryService.MediaLibrarySession.notifyChildrenChanged(MediaSession.ControllerInfo, String, int, MediaLibraryService.LibraryParams)
for the parent.
Parameters | |
---|---|
browser |
MediaBrowser : the browser for this event |
parentId |
String : non-empty parent id that you've specified with
MediaBrowser.subscribe(String, LibraryParams) |
itemCount |
int : number of children |
params |
MediaLibraryService.LibraryParams : library params from the library service. Can be differ from params
that you've specified with MediaBrowser.subscribe(String, LibraryParams) .
|
onSearchResultChanged
public void onSearchResultChanged (MediaBrowser browser, String query, int itemCount, MediaLibraryService.LibraryParams params)
Called when there's change in the search result requested by the previous
MediaBrowser.search(String, LibraryParams)
.
Parameters | |
---|---|
browser |
MediaBrowser : the browser for this event |
query |
String : non-empty search query that you've specified with
MediaBrowser.search(String, LibraryParams) |
itemCount |
int : The item count for the search result |
params |
MediaLibraryService.LibraryParams : library params from the library service. Can be differ from params
that you've specified with MediaBrowser.search(String, LibraryParams) .
|