Example usage for Java android.media AudioManager fields, constructors, methods, implement or subclass
The text is from its open source code.
String | ACTION_AUDIO_BECOMING_NOISY Broadcast intent, a hint for applications that audio is about to become 'noisy' due to a change in audio outputs. |
String | RINGER_MODE_CHANGED_ACTION Sticky broadcast intent action indicating that the ringer mode has changed. |
String | EXTRA_RINGER_MODE The new ringer mode. |
String | ACTION_HEADSET_PLUG Broadcast Action: Wired Headset plugged in or unplugged. |
String | ACTION_HDMI_AUDIO_PLUG Broadcast Action: A sticky broadcast indicating an HDMI cable was plugged or unplugged. |
int | STREAM_VOICE_CALL Used to identify the volume of audio streams for phone calls |
int | STREAM_SYSTEM Used to identify the volume of audio streams for system sounds |
int | STREAM_RING Used to identify the volume of audio streams for the phone ring |
int | STREAM_MUSIC Used to identify the volume of audio streams for music playback |
int | STREAM_ALARM Used to identify the volume of audio streams for alarms |
int | STREAM_NOTIFICATION Used to identify the volume of audio streams for notifications |
int | STREAM_DTMF Used to identify the volume of audio streams for DTMF Tones |
int | ADJUST_RAISE Increase the ringer volume. |
int | ADJUST_LOWER Decrease the ringer volume. |
int | ADJUST_SAME Maintain the previous ringer volume. |
int | ADJUST_MUTE Mute the volume. |
int | ADJUST_UNMUTE Unmute the volume. |
int | ADJUST_TOGGLE_MUTE Toggle the mute state. |
int | FLAG_SHOW_UI Show a toast containing the current volume. |
int | FLAG_ALLOW_RINGER_MODES Whether to include ringer modes as possible options when changing volume. |
int | FLAG_PLAY_SOUND Whether to play a sound when changing the volume. |
int | FLAG_REMOVE_SOUND_AND_VIBRATE Removes any sounds/vibrate that may be in the queue, or are playing (related to changing volume). |
int | RINGER_MODE_SILENT Ringer mode that will be silent and will not vibrate. |
int | RINGER_MODE_VIBRATE Ringer mode that will be silent and will vibrate. |
int | RINGER_MODE_NORMAL Ringer mode that may be audible and may vibrate. |
int | VIBRATE_TYPE_RINGER Vibrate type that corresponds to the ringer. |
int | VIBRATE_SETTING_OFF Vibrate setting that suggests to never vibrate. |
int | VIBRATE_SETTING_ON Vibrate setting that suggests to vibrate when possible. |
int | USE_DEFAULT_STREAM_TYPE Suggests using the default stream type. |
String | ACTION_SCO_AUDIO_STATE_CHANGED Sticky broadcast intent action indicating that the Bluetooth SCO audio connection state has changed. |
String | ACTION_SCO_AUDIO_STATE_UPDATED Sticky broadcast intent action indicating that the Bluetooth SCO audio connection state has been updated. |
int | MODE_INVALID Invalid audio mode. |
int | MODE_NORMAL Normal audio mode: not ringing and no call established. |
int | MODE_RINGTONE Ringing audio mode. |
int | MODE_IN_CALL In call audio mode. |
int | MODE_IN_COMMUNICATION In communication audio mode. |
int | ROUTE_EARPIECE Routing audio output to earpiece |
int | ROUTE_SPEAKER Routing audio output to speaker |
int | ROUTE_ALL Used for mask parameter of #setRouting(int,int,int) . |
int | FX_KEY_CLICK Keyboard and direction pad click sound |
int | FX_FOCUS_NAVIGATION_LEFT Focus has moved left |
int | FX_FOCUS_NAVIGATION_RIGHT Focus has moved right |
int | FX_KEYPRESS_STANDARD IME standard keypress sound |
int | FX_KEYPRESS_SPACEBAR IME spacebar keypress sound |
int | FX_KEYPRESS_DELETE IME delete keypress sound |
int | FX_KEYPRESS_RETURN IME return_keypress sound |
int | AUDIOFOCUS_NONE Used to indicate no audio focus has been gained or lost, or requested. |
int | AUDIOFOCUS_GAIN Used to indicate a gain of audio focus, or a request of audio focus, of unknown duration. |
int | AUDIOFOCUS_GAIN_TRANSIENT Used to indicate a temporary gain or request of audio focus, anticipated to last a short amount of time. |
int | AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK 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"). |
int | AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE 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. |
int | AUDIOFOCUS_LOSS Used to indicate a loss of audio focus of unknown duration. |
int | AUDIOFOCUS_LOSS_TRANSIENT Used to indicate a transient loss of audio focus. |
int | AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK 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. |
int | AUDIOFOCUS_REQUEST_FAILED A failed focus change request. |
int | AUDIOFOCUS_REQUEST_GRANTED A successful focus change request. |
int | AUDIOFOCUS_REQUEST_DELAYED A focus change request whose granting is delayed: the request was successful, but the requester will only be granted audio focus once the condition that prevented immediate granting has ended. |
String | PROPERTY_OUTPUT_SAMPLE_RATE Used as a key for #getProperty to request the native or optimal output sample rate for this device's low latency output stream, in decimal Hz. |
String | PROPERTY_OUTPUT_FRAMES_PER_BUFFER Used as a key for #getProperty to request the native or optimal output buffer size for this device's low latency output stream, in decimal PCM frames. |
int | GET_DEVICES_INPUTS Specifies to the AudioManager#getDevices(int) method to include source (i.e. |
int | GET_DEVICES_OUTPUTS Specifies to the AudioManager#getDevices(int) method to include sink (i.e. |
int | abandonAudioFocus(OnAudioFocusChangeListener l) Abandon audio focus. |
void | adjustStreamVolume(int streamType, int direction, int flags) Adjusts the volume of a particular stream by one step in a direction. |
void | adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags) Adjusts the volume of the most relevant stream, or the given fallback stream. |
void | adjustVolume(int direction, int flags) Adjusts the volume of the most relevant stream. |
int | generateAudioSessionId() Return a new audio session identifier not associated with any player or effect. |
AudioDeviceInfo[] | getDevices(int flags) Returns an array of AudioDeviceInfo objects corresponding to the audio devices currently connected to the system and meeting the criteria specified in the flags parameter. |
int | getMode() Returns the current audio mode. |
String | getProperty(String key) Returns the value of the property with the specified key. |
int | getRingerMode() Returns the current ringtone mode. |
int | getRouting(int mode) Returns the current audio routing bit vector for a specified mode. |
int | getStreamMaxVolume(int streamType) Returns the maximum volume index for a particular stream. |
int | getStreamVolume(int streamType) Returns the current volume index for a particular stream. |
int | getVibrateSetting(int vibrateType) Returns whether the user's vibrate setting for a vibrate type. |
boolean | isBluetoothA2dpOn() Checks whether a Bluetooth A2DP audio peripheral is connected or not. |
boolean | isBluetoothScoAvailableOffCall() Indicates if current platform supports use of SCO for off call use cases. |
boolean | isBluetoothScoOn() Checks whether communications use Bluetooth SCO. |
boolean | isMicrophoneMute() Checks whether the microphone mute is on or off. |
boolean | isMusicActive() Checks whether any music is active. |
boolean | isSpeakerphoneOn() Checks whether the speakerphone is on or off. |
boolean | isStreamMute(int streamType) Returns the current mute state for a particular stream. |
boolean | isWiredHeadsetOn() Checks whether a wired headset is connected or not. |
void | playSoundEffect(int effectType, int userId) Plays a sound effect (Key clicks, lid open/close...) |
void | playSoundEffect(int effectType, float volume) Plays a sound effect (Key clicks, lid open/close...) |
void | playSoundEffect(int effectType) Plays a sound effect (Key clicks, lid open/close...) |
void | registerMediaButtonEventReceiver(ComponentName eventReceiver) Register a component to be the sole receiver of MEDIA_BUTTON intents. |
void | registerMediaButtonEventReceiver(PendingIntent eventReceiver) Register a component to be the sole receiver of MEDIA_BUTTON intents. |
void | registerRemoteControlClient(RemoteControlClient rcClient) Registers the remote control client for providing information to display on the remote controls. |
int | requestAudioFocus(OnAudioFocusChangeListener l, int streamType, int durationHint) Request audio focus. |
void | setBluetoothScoOn(boolean on) Request use of Bluetooth SCO headset for communications. |
void | setMicrophoneMute(boolean on) Sets the microphone mute on or off. |
void | setMode(int mode) Sets the audio mode. |
void | setParameters(String keyValuePairs) Sets a variable number of parameter values to audio hardware. |
void | setRingerMode(int ringerMode) Sets the ringer mode. |
void | setRouting(int mode, int routes, int mask) Sets the audio routing for a specified mode |
void | setSpeakerphoneOn(boolean on) Sets the speakerphone on or off. |
void | setStreamMute(int streamType, boolean state) Mute or unmute an audio stream. |
void | setStreamSolo(int streamType, boolean state) Solo or unsolo a particular stream. |
void | setStreamVolume(int streamType, int index, int flags) Sets the volume index for a particular stream. |
void | setVibrateSetting(int vibrateType, int vibrateSetting) Sets the setting for when the vibrate type should vibrate. |
void | startBluetoothSco() Start bluetooth SCO audio connection. |
void | stopBluetoothSco() Stop bluetooth SCO audio connection. |
void | unregisterMediaButtonEventReceiver(ComponentName eventReceiver) Unregister the receiver of MEDIA_BUTTON intents. |
void | unregisterMediaButtonEventReceiver(PendingIntent eventReceiver) Unregister the receiver of MEDIA_BUTTON intents. |
void | unregisterRemoteControlClient(RemoteControlClient rcClient) Unregisters the remote control client that was providing information to display on the remote controls. |