Android.Media.AudioManager Members

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

See Also: Inherited members from Java.Lang.Object

Protected Constructors

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

Public Fields

const
ActionAudioBecomingNoisystring. Broadcast intent, a hint for applications that audio is about to become 'noisy' due to a change in audio outputs.
const
ActionHdmiAudioPlugstring. Broadcast Action: A sticky broadcast indicating an HMDI cable was plugged or unplugged The intent will have the following extra values: AudioManager.ExtraAudioPlugState, AudioManager.ExtraMaxChannelCount, AudioManager.ExtraEncodings.
const
ActionHeadsetPlugstring. Broadcast Action: Wired Headset plugged in or unplugged.
const
ActionScoAudioStateChangedstring. Sticky broadcast intent action indicating that the bluetoooth SCO audio connection state has changed.
const
ActionScoAudioStateUpdatedstring. Sticky broadcast intent action indicating that the bluetoooth SCO audio connection state has been updated.
const
AudiofocusGainAudioFocus (1). Used to indicate a gain of audio focus, or a request of audio focus, of unknown duration.
const
AudiofocusGainTransientAudioFocus (2). Used to indicate a temporary gain or request of audio focus, anticipated to last a short amount of time.
const
AudiofocusGainTransientExclusiveAudioFocus (4). Used to indicate a temporary request of audio focus, anticipated to last a short amount of time, during which no other applications, or system components, should play anything.
const
AudiofocusGainTransientMayDuckAudioFocus (3). Used to indicate a temporary request of audio focus, anticipated to last a short amount of time, and where it is acceptable for other audio applications to keep playing after having lowered their output level (also referred to as "ducking").
const
AudiofocusLossAudioFocus (-1). Used to indicate a loss of audio focus of unknown duration.
const
AudiofocusLossTransientAudioFocus (-2). Used to indicate a transient loss of audio focus.
const
AudiofocusLossTransientCanDuckAudioFocus (-3). Used to indicate a transient loss of audio focus where the loser of the audio focus can lower its output volume if it wants to continue playing (also referred to as "ducking"), as the new focus owner doesn't require others to be silent.
const
AudiofocusRequestFailedAudioFocusRequest (0). A failed focus change request.
const
AudiofocusRequestGrantedAudioFocusRequest (1). A successful focus change request.
const
AudioSessionIdGenerateint (0). A special audio session ID to indicate that the audio session ID isn't known and the framework should generate a new value.
const
Errorint (-1). A default error code.
const
ErrorDeadObjectint (-6). An error code indicating that the object reporting it is no longer valid and needs to be recreated.
const
ExtraAudioPlugStatestring. Extra used in AudioManager.ActionHdmiAudioPlug to communicate whether HDMI is plugged in or unplugged.
const
ExtraEncodingsstring. Extra used in AudioManager.ActionHdmiAudioPlug to define the audio encodings supported by the connected HDMI device.
const
ExtraMaxChannelCountstring. Extra used in AudioManager.ActionHdmiAudioPlug to define the maximum number of channels supported by the HDMI device.
const
ExtraRingerModestring. The new ringer mode.
const
ExtraScoAudioPreviousStatestring. Extra for intent AudioManager.ActionScoAudioStateUpdated containing the previous bluetooth SCO connection state.
const
ExtraScoAudioStatestring. Extra for intent AudioManager.ActionScoAudioStateChanged or AudioManager.ActionScoAudioStateUpdated containing the new bluetooth SCO connection state.
const
ExtraVibrateSettingstring. The new vibrate setting for a particular type.
const
ExtraVibrateTypestring. The vibrate type whose setting has changed.
const
NumStreamsint (5).
const
PropertyOutputFramesPerBufferstring. Used as a key for AudioManager.GetProperty(string) to request the native or optimal output buffer size for this device's primary output stream, in decimal PCM frames.
const
PropertyOutputSampleRatestring. Used as a key for AudioManager.GetProperty(string) to request the native or optimal output sample rate for this device's primary output stream, in decimal Hz.
const
RingerModeChangedActionstring. Sticky broadcast intent action indicating that the ringer mode has changed.
const
ScoAudioStateConnectedScoAudioState (1). Value for extra AudioManager.ExtraScoAudioState or AudioManager.ExtraScoAudioPreviousState indicating that the SCO audio channel is established
const
ScoAudioStateConnectingScoAudioState (2). Value for extra EXTRA_SCO_AUDIO_STATE or EXTRA_SCO_AUDIO_PREVIOUS_STATE indicating that the SCO audio channel is being established
const
ScoAudioStateDisconnectedScoAudioState (0). Value for extra EXTRA_SCO_AUDIO_STATE or EXTRA_SCO_AUDIO_PREVIOUS_STATE indicating that the SCO audio channel is not established
const
ScoAudioStateErrorScoAudioState (-1). Value for extra EXTRA_SCO_AUDIO_STATE indicating that there was an error trying to obtain the state
const
UseDefaultStreamTypeint (-2147483648). Suggests using the default stream type.
const
VibrateSettingChangedActionstring. Broadcast intent action indicating that the vibrate setting has changed.

Public Properties

BluetoothA2dpOnbool. Checks whether A2DP audio routing to the Bluetooth headset is on or off.
BluetoothScoOnbool. Checks whether communications use Bluetooth SCO.
[read-only]
IsBluetoothScoAvailableOffCallbool. Indicates if current platform supports use of SCO for off call use cases.
[read-only]
IsMusicActivebool. Checks whether any music is active.
[read-only]
IsVolumeFixedbool. Indicates if the device implements a fixed volume policy.
MicrophoneMutebool. Checks whether the microphone mute is on or off.
ModeMode. Returns the current audio mode.
RingerModeRingerMode. Returns the current ringtone mode.
SpeakerphoneOnbool. Checks whether the speakerphone is on or off.
WiredHeadsetOnbool. Checks whether a wired headset is connected or not.

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

AbandonAudioFocus(AudioManager.IOnAudioFocusChangeListener) : AudioFocusRequest
Abandon audio focus.
AdjustStreamVolume(Stream, Adjust, VolumeNotificationFlags)
Adjusts the volume of a particular stream by one step in a direction.
AdjustSuggestedStreamVolume(Adjust, Stream, VolumeNotificationFlags)
Adjusts the volume of the most relevant stream, or the given fallback stream.
AdjustVolume(Adjust, VolumeNotificationFlags)
Adjusts the volume of the most relevant stream.
DispatchMediaKeyEvent(Android.Views.KeyEvent)
Sends a simulated key event for a media button.
static
FromContext(Android.Content.Context) : AudioManager
Documentation for this section has not yet been entered.
GenerateAudioSessionId() : int
Return a new audio session identifier not associated with any player or effect.
GetParameters(string) : string
Gets a variable number of parameter values from audio hardware.
GetProperty(string) : string
Returns the value of the property with the specified key.
GetRouting(Mode) : Route
Returns the current audio routing bit vector for a specified mode.
GetStreamMaxVolume(Stream) : int
Returns the maximum volume index for a particular stream.
GetStreamVolume(Stream) : int
Returns the current volume index for a particular stream.
GetVibrateSetting(VibrateType) : VibrateSetting
Returns whether the user's vibrate setting for a vibrate type.
LoadSoundEffects()
Load Sound effects.
LoadSoundEffectsAsync() : System.Threading.Tasks.Task
Documentation for this section has not yet been entered.
PlaySoundEffect(SoundEffect)
Plays a sound effect (Key clicks, lid open/close.
PlaySoundEffect(SoundEffect, float)
Plays a sound effect (Key clicks, lid open/close.
RegisterMediaButtonEventReceiver(Android.App.PendingIntent)
Register a component to be the sole receiver of MEDIA_BUTTON intents.
RegisterMediaButtonEventReceiver(Android.Content.ComponentName)
Register a component to be the sole receiver of MEDIA_BUTTON intents.
RegisterRemoteControlClient(RemoteControlClient)
Registers the remote control client for providing information to display on the remote controls.
RegisterRemoteController(RemoteController) : bool
Registers a Android.Media.RemoteController instance for it to receive media metadata updates and playback state information from applications using Android.Media.RemoteControlClient, and control their playback.
RequestAudioFocus(AudioManager.IOnAudioFocusChangeListener, Stream, AudioFocus) : AudioFocusRequest
Request audio focus.
SetParameters(string)
Sets a variable number of parameter values to audio hardware.
SetRouting(Mode, Route, Route)
Sets the audio routing for a specified mode
SetStreamMute(Stream, bool)
Mute or unmute an audio stream.
SetStreamSolo(Stream, bool)
Solo or unsolo a particular stream.
SetStreamVolume(Stream, int, VolumeNotificationFlags)
Sets the volume index for a particular stream.
SetVibrateSetting(VibrateType, VibrateSetting)
Sets the setting for when the vibrate type should vibrate.
ShouldVibrate(VibrateType) : bool
Returns whether a particular type should vibrate according to user settings and the current ringer mode.
StartBluetoothSco()
Start bluetooth SCO audio connection.
StopBluetoothSco()
Stop bluetooth SCO audio connection.
UnloadSoundEffects()
Unload Sound effects.
UnregisterMediaButtonEventReceiver(Android.App.PendingIntent)
Unregister the receiver of MEDIA_BUTTON intents.
UnregisterMediaButtonEventReceiver(Android.Content.ComponentName)
Unregister the receiver of MEDIA_BUTTON intents.
UnregisterRemoteControlClient(RemoteControlClient)
Unregisters the remote control client that was providing information to display on the remote controls.
UnregisterRemoteController(RemoteController)
Unregisters a Android.Media.RemoteController, causing it to no longer receive media metadata and playback state information, and no longer be capable of controlling playback.