net.rim.device.api.media.control
Interface AudioPathControl

All Superinterfaces:
Control

public interface AudioPathControl
extends Control

AudioPathControl provides access to changing the audio path on media streams.

Since:
BlackBerry API 4.2.0

Field Summary
static int AUDIO_PATH_BLUETOOTH
          Audio Path is Bluetooth SCO such as a paired Bluetooth enabled device, for example, a Bluetooth car kit.
static int AUDIO_PATH_BLUETOOTH_A2DP
          Audio Path is for a paired Bluetooth enabled device such as a Bluetooth stereo headset for listening to music.
static int AUDIO_PATH_HANDSET
          Audio Path is the earpiece on the BlackBerry device.
static int AUDIO_PATH_HANDSFREE
          Audio Path is the speakerphone on the BlackBerry device.
static int AUDIO_PATH_HEADSET
          Audio Path is the BlackBerry Hands-free Headset.
static int AUDIO_PATH_HEADSET_HANDSFREE
          Audio Path is the speakerphone on the BlackBerry device and the BlackBerry Hands-free Headset.
 
Method Summary
 boolean canSwitchToPath(int path)
           
 int getAudioPath()
          Returns the current audio path.
 boolean isPathExplicitlySet()
          Checks if this the audio path has been explicitly set or is using the default supplied by the AudioRouter.
 void resetAudioPath()
          Resets the audio path to the default.
 void setAudioPath(int newPath)
          Requests a change from the current audio path to the given audio path.
 



Field Detail

AUDIO_PATH_HANDSET

static final int AUDIO_PATH_HANDSET
Audio Path is the earpiece on the BlackBerry device.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

AUDIO_PATH_HANDSFREE

static final int AUDIO_PATH_HANDSFREE
Audio Path is the speakerphone on the BlackBerry device.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

AUDIO_PATH_BLUETOOTH

static final int AUDIO_PATH_BLUETOOTH
Audio Path is Bluetooth SCO such as a paired Bluetooth enabled device, for example, a Bluetooth car kit.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

AUDIO_PATH_HEADSET

static final int AUDIO_PATH_HEADSET
Audio Path is the BlackBerry Hands-free Headset.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

AUDIO_PATH_HEADSET_HANDSFREE

static final int AUDIO_PATH_HEADSET_HANDSFREE
Audio Path is the speakerphone on the BlackBerry device and the BlackBerry Hands-free Headset.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

AUDIO_PATH_BLUETOOTH_A2DP

static final int AUDIO_PATH_BLUETOOTH_A2DP
Audio Path is for a paired Bluetooth enabled device such as a Bluetooth stereo headset for listening to music.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0


Method Detail

setAudioPath

void setAudioPath(int newPath)
                  throws MediaException,
                         IllegalArgumentException
Requests a change from the current audio path to the given audio path.

Parameters:
newPath - The audio path to switch to. A valid audio path is one of the AUDIO_PATH_* constants.
Throws:
MediaException - If the specified audio path is not allowed for the audio source of this AudioControlPath. For example, AUDIO_PATH_HEADSET is not allowed for any AudioControlPath objects, regardless of their source, if the headset is not connected.
IllegalArgumentException - if newPath is not one of the AUDIO_PATH_* constants.
Since:
BlackBerry API 4.2.0

getAudioPath

int getAudioPath()
Returns the current audio path.

Returns:
an enumerated integer representing the current audio path one of the AUDIO_PATH_ values.
Since:
BlackBerry API 4.2.0

canSwitchToPath

boolean canSwitchToPath(int path)
Parameters:
path - the audio path.
Returns:
True if we can switch to the specified path; false if the path is invalid or the audio is already set to the specified path
Since:
BlackBerry API 6.0.0

resetAudioPath

void resetAudioPath()
Resets the audio path to the default.

Since:
BlackBerry API 6.0.0

isPathExplicitlySet

boolean isPathExplicitlySet()
Checks if this the audio path has been explicitly set or is using the default supplied by the AudioRouter.

Returns:
true if the audio path has been explicitly set, false otherwise.
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.