![]() |
Jabber Guest Android SDK
|
The AudioRouteManager can be used to query and set audio paths available on the device. More...
Inherits BroadcastReceiver.
Public Member Functions | |
AudioRouteType | getActiveAudioRouteType () |
Returns the AudioRoueType currently used by the application. More... | |
void | updateAudioRoute (AudioRouteType route) throws IllegalArgumentException |
This method will update the current audio routing to AudioRouteType specified. More... | |
boolean | isAudioRouteAvailable (AudioRouteType route) |
Given an AudioRouteType, the method will determine if a route of that type is currently available for use on the device. More... | |
List< AudioRoute > | getAvailableAudioRoutes () |
Returns a java.util.List of the currently available AudioRoute on the device. More... | |
Protected Member Functions | |
AudioRouteManager (Context context) | |
Construct an AudioRouteManager object. More... | |
Detailed Description
The AudioRouteManager can be used to query and set audio paths available on the device.
Rather than creating an AudioRouteManager directly, get the shared instance from JabberGuestCall.getAudioRouteManager().
Constructor & Destructor Documentation
|
inlineprotected |
Construct an AudioRouteManager object.
- Parameters
-
context Current application context
Member Function Documentation
|
inline |
Returns the AudioRoueType currently used by the application.
The value returned will change as the audio route used changes.
- Returns
- AudioRouteType The AudioRouteType in use
|
inline |
Returns a java.util.List of the currently available AudioRoute on the device.
The list returned is true at the time the method was called. It is the calling parties responsibility to ensure that a particular route is still available at the time the route is to be used. This can be done by calling method isAudioRouteAvailable on an instance of AudioRouteManager.
- Returns
- A list of currently available AudioRoute
|
inline |
Given an AudioRouteType, the method will determine if a route of that type is currently available for use on the device.
An example of a audio route whose availability may change over time is that of a Bluetooth headset, which can be turned off by a user at any time or may go out of range.
- Parameters
-
route A value from the AudioRouteType enum
- Returns
- True if the AudioRouteType is available for use; false otherwise
|
inline |
This method will update the current audio routing to AudioRouteType specified.
Do note that the AudioRouteManager class automatically listens for intent ACTION_HEADSET_PLUG which is broadcasted whenever a headphone is plugged into or removed from a device. When a headphone is plugged into a device, audio will automatically be directed to it. When a headphone is removed, the audio is directed to the speakerphone.
- Parameters
-
route The AudioRouteType that audio should now be directed towards.
- Exceptions
-
IllegalArgumentException If the AudioRouteType specified is NULL.