public abstract class

MediaBrowserCompat.SearchCallback

extends java.lang.Object

 java.lang.Object

↳androidx.media3.session.legacy.MediaBrowserCompat.SearchCallback

Overview

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

Summary

Constructors
publicSearchCallback()

Methods
public voidonError(java.lang.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).

public voidonSearchResult(java.lang.String query, Bundle extras, java.util.List<MediaBrowserCompat.MediaItem> items)

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public SearchCallback()

Methods

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

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

Parameters:

query: The search query sent for the search request to the connected service.
extras: The bundle of service-specific arguments sent to the connected service.
items: The list of media items which contains the search result.

public void onError(java.lang.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: The search query sent for the search request to the connected service.
extras: The bundle of service-specific arguments sent to the connected service.