com.cisco.jabber.guest.sdk.AudioRouteManager Class Reference

The AudioRouteManager can be used to query and set audio paths available on the device. More...

Inherits BroadcastReceiver.

Public Member Functions

JabberGuestCall.AudioRouteType getActiveAudioRouteType ()
 Returns the JabberGuestCall.AudioRouteType currently used by the application. More...
 
void updateAudioRoute (JabberGuestCall.AudioRouteType route) throws IllegalArgumentException
 This method will update the current audio routing to JabberGuestCall.AudioRouteType specified. More...
 
boolean isAudioRouteAvailable (JabberGuestCall.AudioRouteType route)
 Given an JabberGuestCall.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

com.cisco.jabber.guest.sdk.AudioRouteManager.AudioRouteManager ( Context  context)
inlineprotected

Construct an AudioRouteManager object.

Parameters
contextCurrent application context

Member Function Documentation

JabberGuestCall.AudioRouteType com.cisco.jabber.guest.sdk.AudioRouteManager.getActiveAudioRouteType ( )
inline

Returns the JabberGuestCall.AudioRouteType currently used by the application.

The value returned will change as the audio route used changes.

Returns
AudioRouteType The JabberGuestCall.AudioRouteType in use
List<AudioRoute> com.cisco.jabber.guest.sdk.AudioRouteManager.getAvailableAudioRoutes ( )
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
boolean com.cisco.jabber.guest.sdk.AudioRouteManager.isAudioRouteAvailable ( JabberGuestCall.AudioRouteType  route)
inline

Given an JabberGuestCall.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
routeA value from the JabberGuestCall.AudioRouteType enum
Returns
True if the AudioRouteType is available for use; false otherwise
void com.cisco.jabber.guest.sdk.AudioRouteManager.updateAudioRoute ( JabberGuestCall.AudioRouteType  route) throws IllegalArgumentException
inline

This method will update the current audio routing to JabberGuestCall.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
routeThe JabberGuestCall.AudioRouteType that audio should now be directed towards.
Exceptions
IllegalArgumentExceptionIf the JabberGuestCall.AudioRouteType specified is NULL.