MediaBrowserCompat.SearchCallback

public abstract class MediaBrowserCompat.SearchCallback


Callback for receiving the result of search.

Summary

Public constructors

Public methods

void
onError(@NonNull String query, Bundle extras)

Called when an error happens while search or the connected service doesn't support search.

void
onSearchResult(
    @NonNull String query,
    Bundle extras,
    @NonNull List<MediaBrowserCompat.MediaItem> items
)

Called when the search finished successfully.

Public constructors

SearchCallback

Added in 1.1.0
public SearchCallback()

Public methods

onError

Added in 1.1.0
public void onError(@NonNull String query, Bundle extras)

Called when an error happens while search or the connected service doesn't support search.

Parameters
@NonNull String query

The search query sent for the search request to the connected service.

Bundle extras

The bundle of service-specific arguments sent to the connected service.

onSearchResult

Added in 1.1.0
public void onSearchResult(
    @NonNull String query,
    Bundle extras,
    @NonNull List<MediaBrowserCompat.MediaItem> items
)

Called when the search finished successfully.

Parameters
@NonNull String query

The search query sent for the search request to the connected service.

Bundle extras

The bundle of service-specific arguments sent to the connected service.

@NonNull List<MediaBrowserCompat.MediaItem> items

The list of media items which contains the search result.