Condividi tramite


MediaController.TransportControls.PrepareFromSearch(String, Bundle) Method

Definition

Request that the player prepare playback for a specific search query.

[Android.Runtime.Register("prepareFromSearch", "(Ljava/lang/String;Landroid/os/Bundle;)V", "", ApiSince=24)]
public void PrepareFromSearch (string? query, Android.OS.Bundle? extras);
[<Android.Runtime.Register("prepareFromSearch", "(Ljava/lang/String;Landroid/os/Bundle;)V", "", ApiSince=24)>]
member this.PrepareFromSearch : string * Android.OS.Bundle -> unit

Parameters

query
String

The search query.

extras
Bundle

Optional extras that can include extra information about the query.

Attributes

Remarks

Request that the player prepare playback for a specific search query. An empty or null query should be treated as a request to prepare any music. In other words, other sessions can continue to play during the preparation of this session. This method can be used to speed up the start of the playback. Once the preparation is done, the session will change its playback state to PlaybackState#STATE_PAUSED. Afterwards, #play can be called to start playback. If the preparation is not needed, #playFromSearch can be directly called without this method.

Java documentation for android.media.session.MediaController.TransportControls.prepareFromSearch(java.lang.String, android.os.Bundle).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to