added in version 25.4.0
belongs to Maven artifact com.android.support:support-media-compat:28.0.0-alpha1

MediaBrowserCompat.SearchCallback

public static abstract class MediaBrowserCompat.SearchCallback
extends Object

java.lang.Object
   ↳ android.support.v4.media.MediaBrowserCompat.SearchCallback


Callback for receiving the result of search(String, Bundle, MediaBrowserCompat.SearchCallback).

Summary

Public constructors

MediaBrowserCompat.SearchCallback()

Public methods

void onError(String query, Bundle extras)

Called when an error happens while search(String, Bundle, MediaBrowserCompat.SearchCallback) or the connected service doesn't support search(String, Bundle, MediaBrowserCompat.SearchCallback).

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

Called when the search(String, Bundle, MediaBrowserCompat.SearchCallback) finished successfully.

Inherited methods

From class java.lang.Object

Public constructors

MediaBrowserCompat.SearchCallback

added in version 25.4.0
MediaBrowserCompat.SearchCallback ()

Public methods

onError

added in version 25.4.0
void onError (String query,
                Bundle extras)

Called when an error happens while search(String, Bundle, MediaBrowserCompat.SearchCallback) or the connected service doesn't support search(String, Bundle, MediaBrowserCompat.SearchCallback).

Parameters
query String: The search query sent for the search request to the connected service.

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

onSearchResult

added in version 25.4.0
void onSearchResult (String query,
                Bundle extras,
                List<MediaBrowserCompat.MediaItem> items)

Called when the search(String, Bundle, MediaBrowserCompat.SearchCallback) finished successfully.

Parameters
query String: The search query sent for the search request to the connected service.

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

items List: The list of media items which contains the search result.