Android.Media.MediaActionSound Class

See Also: MediaActionSound Members

Syntax

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

Remarks

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 Android.Hardware.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 Android.Hardware.Camera.SetPreviewTexture(Android.Graphics.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 Android.Media.MediaRecorder for still images or video, respectively, as the Android framework will play the appropriate sounds when needed for these calls.

[Android Documentation]

Requirements

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