MediaPlayer.PrepareAsync Method

Definition

Prepares the player for playback, asynchronously.

[Android.Runtime.Register("prepareAsync", "()V", "GetPrepareAsyncHandler")]
public virtual void PrepareAsync ();
[<Android.Runtime.Register("prepareAsync", "()V", "GetPrepareAsyncHandler")>]
abstract member PrepareAsync : unit -> unit
override this.PrepareAsync : unit -> unit
Attributes

Exceptions

if it is called in an invalid state

Remarks

Prepares the player for playback, asynchronously.

After setting the datasource and the display surface, you need to either call prepare() or prepareAsync(). For streams, you should call prepareAsync(), which returns immediately, rather than blocking until enough data has been buffered.

Java documentation for android.media.MediaPlayer.prepareAsync().

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