Android.Media.AudioManager.PlaySoundEffect Method
Plays a sound effect (Key clicks, lid open/close.

Syntax

[Android.Runtime.Register("playSoundEffect", "(IF)V", "GetPlaySoundEffect_IFHandler")]
public virtual void PlaySoundEffect ([Android.Runtime.GeneratedEnum] SoundEffect effectType, float volume)

Parameters

effectType
The type of sound effect. One of AudioManager.FX_KEY_CLICK, AudioManager.FX_FOCUS_NAVIGATION_UP, AudioManager.FX_FOCUS_NAVIGATION_DOWN, AudioManager.FX_FOCUS_NAVIGATION_LEFT, AudioManager.FX_FOCUS_NAVIGATION_RIGHT, AudioManager.FX_KEYPRESS_STANDARD, AudioManager.FX_KEYPRESS_SPACEBAR, AudioManager.FX_KEYPRESS_DELETE, AudioManager.FX_KEYPRESS_RETURN, AudioManager.FX_KEYPRESS_INVALID,
volume
Sound effect volume. The volume value is a raw scalar so UI controls should be scaled logarithmically. If a volume of -1 is specified, the AudioManager.STREAM_MUSIC stream volume minus 3dB will be used. NOTE: This version is for applications that have their own settings panel for enabling and controlling volume.

Remarks

Plays a sound effect (Key clicks, lid open/close...)

[Android Documentation]

Requirements

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