Compartir a través de


MediaSession.Callback.OnPrepare Method

Definition

Override to handle requests to prepare playback.

[Android.Runtime.Register("onPrepare", "()V", "GetOnPrepareHandler", ApiSince=24)]
public virtual void OnPrepare ();
[<Android.Runtime.Register("onPrepare", "()V", "GetOnPrepareHandler", ApiSince=24)>]
abstract member OnPrepare : unit -> unit
override this.OnPrepare : unit -> unit
Attributes

Remarks

Override to handle requests to prepare playback. During the preparation, a session should not hold audio focus in order to allow other sessions play seamlessly. The state of playback should be updated to PlaybackState#STATE_PAUSED after the preparation is done.

Java documentation for android.media.session.MediaSession.Callback.onPrepare().

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