lightbulb_outline Help shape the future of the Google Play Console, Android Studio, and Firebase. Start survey
added in version 25.4.0
belongs to Maven artifact androidx.media:media:1.0.0-alpha3

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 MediaBrowserCompat.search(String, Bundle, MediaBrowserCompat.SearchCallback).

Summary

Public constructors

MediaBrowserCompat.SearchCallback()

Public methods

void onError(String query, Bundle extras)

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

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

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

Inherited methods

Public constructors

MediaBrowserCompat.SearchCallback

added in version 25.4.0
public MediaBrowserCompat.SearchCallback ()

Public methods

onError

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

Called when an error happens while MediaBrowserCompat.search(String, Bundle, MediaBrowserCompat.SearchCallback) or the connected service doesn't support MediaBrowserCompat.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
public void onSearchResult (String query, 
                Bundle extras, 
                List<MediaBrowserCompat.MediaItem> items)

Called when the MediaBrowserCompat.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.