See Also: MediaActionSound
public class MediaActionSound : Object
A class for producing sounds that match those produced by various actions taken by the media and camera APIs.
This class is recommended for use with the Android.Hardware.Camera2 API, since the camera2 API does not play any sounds on its own for any capture or video recording actions.
With the older Camera API, use this class to play an appropriate camera operation sound when implementing a custom still or video recording mechanism (through the Camera preview callbacks with Android.Hardware.Camera.SetPreviewCallback(.IPreviewCallback), or through GPU processing with Camera.SetPreviewTexture(SurfaceTexture), for example), or when implementing some other camera-like function in your application.
There is no need to play sounds when using Android.Hardware.Camera.TakePicture(.IShutterCallback, .IPictureCallback, .IPictureCallback) or MediaRecorder for still images or video, respectively, as the Android framework will play the appropriate sounds when needed for these calls.
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 16
The members of Android.Media.MediaActionSound are listed below.
See Also: Object
|Construct a new MediaActionSound instance.|
|FocusComplete||MediaActionSoundType (1). A sound to indicate that focusing has completed.|
|ShutterClick||MediaActionSoundType (0). The sound used by Android.Hardware.Camera.TakePicture(.IShutterCallback, .IPictureCallback, .IPictureCallback) to indicate still image capture.|
|StartVideoRecording||MediaActionSoundType (2). The sound used by MediaRecorder.Start to indicate the start of video recording.|
|StopVideoRecording||MediaActionSoundType (3). The sound used by MediaRecorder.Stop to indicate the end of video recording.|
Preload a predefined platform sound to minimize latency when the sound is played later by MediaActionSound.Play(MediaActionSoundType).
Free up all audio resources used by this MediaActionSound instance.