Android Guides | Samples

Android.Media.AsyncPlayer Class

Plays a series of audio URIs, but does all the hard work on another thread so that any slowness with preparing or loading doesn't block the calling thread.

See Also: AsyncPlayer

Syntax

[Android.Runtime.Register("android/media/AsyncPlayer", DoNotGenerateAcw=true)]
public class AsyncPlayer : Object

Remarks

Plays a series of audio URIs, but does all the hard work on another thread so that any slowness with preparing or loading doesn't block the calling thread.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Media.AsyncPlayer are listed below.

See Also: Object

Public Constructors

Construct an AsyncPlayer object.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Play(Context, Uri, Boolean, Stream)
Start playing the sound.
Stop()
Stop a previously played sound.