android.media
Class AudioManager
java.lang.Object
android.media.AudioManager
public class AudioManager
- extends Object
Method Summary |
int |
abandonAudioFocus(AudioManager.OnAudioFocusChangeListener l)
|
void |
adjustStreamVolume(int streamType,
int direction,
int flags)
|
void |
adjustSuggestedStreamVolume(int direction,
int suggestedStreamType,
int flags)
|
void |
adjustVolume(int direction,
int flags)
|
int |
getMode()
|
String |
getParameters(String keys)
|
int |
getRingerMode()
|
int |
getRouting(int mode)
|
int |
getStreamMaxVolume(int streamType)
|
int |
getStreamVolume(int streamType)
|
int |
getVibrateSetting(int vibrateType)
|
boolean |
isBluetoothA2dpOn()
|
boolean |
isBluetoothScoAvailableOffCall()
|
boolean |
isBluetoothScoOn()
|
boolean |
isMicrophoneMute()
|
boolean |
isMusicActive()
|
boolean |
isSpeakerphoneOn()
|
boolean |
isWiredHeadsetOn()
|
void |
loadSoundEffects()
|
void |
playSoundEffect(int effectType)
|
void |
playSoundEffect(int effectType,
float volume)
|
void |
registerMediaButtonEventReceiver(ComponentName eventReceiver)
|
void |
registerRemoteControlClient(RemoteControlClient rcClient)
|
int |
requestAudioFocus(AudioManager.OnAudioFocusChangeListener l,
int streamType,
int durationHint)
|
void |
setBluetoothA2dpOn(boolean on)
|
void |
setBluetoothScoOn(boolean on)
|
void |
setMicrophoneMute(boolean on)
|
void |
setMode(int mode)
|
void |
setParameters(String keyValuePairs)
|
void |
setRingerMode(int ringerMode)
|
void |
setRouting(int mode,
int routes,
int mask)
|
void |
setSpeakerphoneOn(boolean on)
|
void |
setStreamMute(int streamType,
boolean state)
|
void |
setStreamSolo(int streamType,
boolean state)
|
void |
setStreamVolume(int streamType,
int index,
int flags)
|
void |
setVibrateSetting(int vibrateType,
int vibrateSetting)
|
void |
setWiredHeadsetOn(boolean on)
|
boolean |
shouldVibrate(int vibrateType)
|
void |
startBluetoothSco()
|
void |
stopBluetoothSco()
|
void |
unloadSoundEffects()
|
void |
unregisterMediaButtonEventReceiver(ComponentName eventReceiver)
|
void |
unregisterRemoteControlClient(RemoteControlClient rcClient)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ACTION_AUDIO_BECOMING_NOISY
public static final String ACTION_AUDIO_BECOMING_NOISY
- See Also:
- Constant Field Values
RINGER_MODE_CHANGED_ACTION
public static final String RINGER_MODE_CHANGED_ACTION
- See Also:
- Constant Field Values
EXTRA_RINGER_MODE
public static final String EXTRA_RINGER_MODE
- See Also:
- Constant Field Values
VIBRATE_SETTING_CHANGED_ACTION
public static final String VIBRATE_SETTING_CHANGED_ACTION
- See Also:
- Constant Field Values
EXTRA_VIBRATE_SETTING
public static final String EXTRA_VIBRATE_SETTING
- See Also:
- Constant Field Values
EXTRA_VIBRATE_TYPE
public static final String EXTRA_VIBRATE_TYPE
- See Also:
- Constant Field Values
STREAM_VOICE_CALL
public static final int STREAM_VOICE_CALL
- See Also:
- Constant Field Values
STREAM_SYSTEM
public static final int STREAM_SYSTEM
- See Also:
- Constant Field Values
STREAM_RING
public static final int STREAM_RING
- See Also:
- Constant Field Values
STREAM_MUSIC
public static final int STREAM_MUSIC
- See Also:
- Constant Field Values
STREAM_ALARM
public static final int STREAM_ALARM
- See Also:
- Constant Field Values
STREAM_NOTIFICATION
public static final int STREAM_NOTIFICATION
- See Also:
- Constant Field Values
STREAM_DTMF
public static final int STREAM_DTMF
- See Also:
- Constant Field Values
NUM_STREAMS
public static final int NUM_STREAMS
- See Also:
- Constant Field Values
ADJUST_RAISE
public static final int ADJUST_RAISE
- See Also:
- Constant Field Values
ADJUST_LOWER
public static final int ADJUST_LOWER
- See Also:
- Constant Field Values
ADJUST_SAME
public static final int ADJUST_SAME
- See Also:
- Constant Field Values
FLAG_SHOW_UI
public static final int FLAG_SHOW_UI
- See Also:
- Constant Field Values
FLAG_ALLOW_RINGER_MODES
public static final int FLAG_ALLOW_RINGER_MODES
- See Also:
- Constant Field Values
FLAG_PLAY_SOUND
public static final int FLAG_PLAY_SOUND
- See Also:
- Constant Field Values
FLAG_REMOVE_SOUND_AND_VIBRATE
public static final int FLAG_REMOVE_SOUND_AND_VIBRATE
- See Also:
- Constant Field Values
FLAG_VIBRATE
public static final int FLAG_VIBRATE
- See Also:
- Constant Field Values
RINGER_MODE_SILENT
public static final int RINGER_MODE_SILENT
- See Also:
- Constant Field Values
RINGER_MODE_VIBRATE
public static final int RINGER_MODE_VIBRATE
- See Also:
- Constant Field Values
RINGER_MODE_NORMAL
public static final int RINGER_MODE_NORMAL
- See Also:
- Constant Field Values
VIBRATE_TYPE_RINGER
public static final int VIBRATE_TYPE_RINGER
- See Also:
- Constant Field Values
VIBRATE_TYPE_NOTIFICATION
public static final int VIBRATE_TYPE_NOTIFICATION
- See Also:
- Constant Field Values
VIBRATE_SETTING_OFF
public static final int VIBRATE_SETTING_OFF
- See Also:
- Constant Field Values
VIBRATE_SETTING_ON
public static final int VIBRATE_SETTING_ON
- See Also:
- Constant Field Values
VIBRATE_SETTING_ONLY_SILENT
public static final int VIBRATE_SETTING_ONLY_SILENT
- See Also:
- Constant Field Values
USE_DEFAULT_STREAM_TYPE
public static final int USE_DEFAULT_STREAM_TYPE
- See Also:
- Constant Field Values
ACTION_SCO_AUDIO_STATE_CHANGED
public static final String ACTION_SCO_AUDIO_STATE_CHANGED
- See Also:
- Constant Field Values
ACTION_SCO_AUDIO_STATE_UPDATED
public static final String ACTION_SCO_AUDIO_STATE_UPDATED
- See Also:
- Constant Field Values
EXTRA_SCO_AUDIO_STATE
public static final String EXTRA_SCO_AUDIO_STATE
- See Also:
- Constant Field Values
EXTRA_SCO_AUDIO_PREVIOUS_STATE
public static final String EXTRA_SCO_AUDIO_PREVIOUS_STATE
- See Also:
- Constant Field Values
SCO_AUDIO_STATE_DISCONNECTED
public static final int SCO_AUDIO_STATE_DISCONNECTED
- See Also:
- Constant Field Values
SCO_AUDIO_STATE_CONNECTED
public static final int SCO_AUDIO_STATE_CONNECTED
- See Also:
- Constant Field Values
SCO_AUDIO_STATE_CONNECTING
public static final int SCO_AUDIO_STATE_CONNECTING
- See Also:
- Constant Field Values
SCO_AUDIO_STATE_ERROR
public static final int SCO_AUDIO_STATE_ERROR
- See Also:
- Constant Field Values
MODE_INVALID
public static final int MODE_INVALID
- See Also:
- Constant Field Values
MODE_CURRENT
public static final int MODE_CURRENT
- See Also:
- Constant Field Values
MODE_NORMAL
public static final int MODE_NORMAL
- See Also:
- Constant Field Values
MODE_RINGTONE
public static final int MODE_RINGTONE
- See Also:
- Constant Field Values
MODE_IN_CALL
public static final int MODE_IN_CALL
- See Also:
- Constant Field Values
MODE_IN_COMMUNICATION
public static final int MODE_IN_COMMUNICATION
- See Also:
- Constant Field Values
ROUTE_EARPIECE
public static final int ROUTE_EARPIECE
- See Also:
- Constant Field Values
ROUTE_SPEAKER
public static final int ROUTE_SPEAKER
- See Also:
- Constant Field Values
ROUTE_BLUETOOTH
public static final int ROUTE_BLUETOOTH
- See Also:
- Constant Field Values
ROUTE_BLUETOOTH_SCO
public static final int ROUTE_BLUETOOTH_SCO
- See Also:
- Constant Field Values
ROUTE_HEADSET
public static final int ROUTE_HEADSET
- See Also:
- Constant Field Values
ROUTE_BLUETOOTH_A2DP
public static final int ROUTE_BLUETOOTH_A2DP
- See Also:
- Constant Field Values
ROUTE_ALL
public static final int ROUTE_ALL
- See Also:
- Constant Field Values
FX_KEY_CLICK
public static final int FX_KEY_CLICK
- See Also:
- Constant Field Values
FX_FOCUS_NAVIGATION_UP
public static final int FX_FOCUS_NAVIGATION_UP
- See Also:
- Constant Field Values
FX_FOCUS_NAVIGATION_DOWN
public static final int FX_FOCUS_NAVIGATION_DOWN
- See Also:
- Constant Field Values
FX_FOCUS_NAVIGATION_LEFT
public static final int FX_FOCUS_NAVIGATION_LEFT
- See Also:
- Constant Field Values
FX_FOCUS_NAVIGATION_RIGHT
public static final int FX_FOCUS_NAVIGATION_RIGHT
- See Also:
- Constant Field Values
FX_KEYPRESS_STANDARD
public static final int FX_KEYPRESS_STANDARD
- See Also:
- Constant Field Values
FX_KEYPRESS_SPACEBAR
public static final int FX_KEYPRESS_SPACEBAR
- See Also:
- Constant Field Values
FX_KEYPRESS_DELETE
public static final int FX_KEYPRESS_DELETE
- See Also:
- Constant Field Values
FX_KEYPRESS_RETURN
public static final int FX_KEYPRESS_RETURN
- See Also:
- Constant Field Values
AUDIOFOCUS_GAIN
public static final int AUDIOFOCUS_GAIN
- See Also:
- Constant Field Values
AUDIOFOCUS_GAIN_TRANSIENT
public static final int AUDIOFOCUS_GAIN_TRANSIENT
- See Also:
- Constant Field Values
AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK
public static final int AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK
- See Also:
- Constant Field Values
AUDIOFOCUS_LOSS
public static final int AUDIOFOCUS_LOSS
- See Also:
- Constant Field Values
AUDIOFOCUS_LOSS_TRANSIENT
public static final int AUDIOFOCUS_LOSS_TRANSIENT
- See Also:
- Constant Field Values
AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK
public static final int AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK
- See Also:
- Constant Field Values
AUDIOFOCUS_REQUEST_FAILED
public static final int AUDIOFOCUS_REQUEST_FAILED
- See Also:
- Constant Field Values
AUDIOFOCUS_REQUEST_GRANTED
public static final int AUDIOFOCUS_REQUEST_GRANTED
- See Also:
- Constant Field Values
adjustStreamVolume
public void adjustStreamVolume(int streamType,
int direction,
int flags)
adjustVolume
public void adjustVolume(int direction,
int flags)
adjustSuggestedStreamVolume
public void adjustSuggestedStreamVolume(int direction,
int suggestedStreamType,
int flags)
getRingerMode
public int getRingerMode()
getStreamMaxVolume
public int getStreamMaxVolume(int streamType)
getStreamVolume
public int getStreamVolume(int streamType)
setRingerMode
public void setRingerMode(int ringerMode)
setStreamVolume
public void setStreamVolume(int streamType,
int index,
int flags)
setStreamSolo
public void setStreamSolo(int streamType,
boolean state)
setStreamMute
public void setStreamMute(int streamType,
boolean state)
shouldVibrate
public boolean shouldVibrate(int vibrateType)
getVibrateSetting
public int getVibrateSetting(int vibrateType)
setVibrateSetting
public void setVibrateSetting(int vibrateType,
int vibrateSetting)
setSpeakerphoneOn
public void setSpeakerphoneOn(boolean on)
isSpeakerphoneOn
public boolean isSpeakerphoneOn()
isBluetoothScoAvailableOffCall
public boolean isBluetoothScoAvailableOffCall()
startBluetoothSco
public void startBluetoothSco()
stopBluetoothSco
public void stopBluetoothSco()
setBluetoothScoOn
public void setBluetoothScoOn(boolean on)
isBluetoothScoOn
public boolean isBluetoothScoOn()
setBluetoothA2dpOn
public void setBluetoothA2dpOn(boolean on)
isBluetoothA2dpOn
public boolean isBluetoothA2dpOn()
setWiredHeadsetOn
public void setWiredHeadsetOn(boolean on)
isWiredHeadsetOn
public boolean isWiredHeadsetOn()
setMicrophoneMute
public void setMicrophoneMute(boolean on)
isMicrophoneMute
public boolean isMicrophoneMute()
setMode
public void setMode(int mode)
getMode
public int getMode()
setRouting
public void setRouting(int mode,
int routes,
int mask)
getRouting
public int getRouting(int mode)
isMusicActive
public boolean isMusicActive()
setParameters
public void setParameters(String keyValuePairs)
getParameters
public String getParameters(String keys)
playSoundEffect
public void playSoundEffect(int effectType)
playSoundEffect
public void playSoundEffect(int effectType,
float volume)
loadSoundEffects
public void loadSoundEffects()
unloadSoundEffects
public void unloadSoundEffects()
requestAudioFocus
public int requestAudioFocus(AudioManager.OnAudioFocusChangeListener l,
int streamType,
int durationHint)
abandonAudioFocus
public int abandonAudioFocus(AudioManager.OnAudioFocusChangeListener l)
registerMediaButtonEventReceiver
public void registerMediaButtonEventReceiver(ComponentName eventReceiver)
unregisterMediaButtonEventReceiver
public void unregisterMediaButtonEventReceiver(ComponentName eventReceiver)
registerRemoteControlClient
public void registerRemoteControlClient(RemoteControlClient rcClient)
unregisterRemoteControlClient
public void unregisterRemoteControlClient(RemoteControlClient rcClient)
Copyright © 2008-2012. All Rights Reserved.