com.mot.iden.device
Class AudioManager

java.lang.Object
  extended bycom.mot.iden.device.AudioManager

public class AudioManager
extends java.lang.Object

This class acts as a factory for getting controls for Line1/Line2/Data/.... It also has methods general to audio control for the radio.

A list of strings to be used for getControl and the interfaces the object returned implements.

String
Implemented Interfaces
"Line1", "Line2", "Message", "Reminder", and "CallAlert" VolumeControl, NotificationTypeControl, RingerControl
"Data" VolumeControl, NotificationTypeControl
"KeyPad", "VoiceEarpiece", "VoiceSpeaker", "JavaEarpiece", and "JavaSpeaker" VolumeControl
"AudioRouting" OutboundRouteControl
MOTOROLA and the Stylized M Logo are registered trademarks of Motorola, Inc. Reg. U.S. Pat. & Tm. Off.
© Copyright 2003 Motorola, Inc. All Rights Reserved.


Field Summary
static int EARPIECE
          This is a return value used in getAudioAccessoryType.
static int HEADSET_AND_SPEAKER
          This is a return value used in getHeadset and a parameter for setHeadset.
static int HEADSET_ONLY
          This is a return value used in getHeadset and a parameter for setHeadset.
static int JAVA
          This is a value used for setRoute and getRoute.
static int MAX_RINGERS
          This number represents the maximum number of ringers available in the phone.
static int NONE
          This is a return value used in getAudioAccessoryType.
static int PHONE_CALL
          This is a value used for setRoute and getRoute.
static int RING
          This is a return value used in getType and a parameter for setType.
static int RING_VIBE
          This is a return value used in getType and a parameter for setType.
static int SILENT
          This is a return value used in getType and a parameter for setType.
static int SPEAKER
          This is a value used for setRoute and getRoute, and also a return value used in getAudioAccessoryType.
static int TWO_WAY_RADIO
          This is a value used for setRoute and getRoute.
static int VIBRATE
          This is a return value used in getType and a parameter for setType.
 
Method Summary
static int getAudioAccessoryType()
          This function was stubbed out on Gemini.
static Control getControl(java.lang.String s)
          This method returns an object for a particular notification, such as Line1, Line2, or CallAlert.
static int getHeadset()
           
static java.lang.String[] getRingerList()
           
static boolean getVibeAll()
           
static void setHeadset(int head)
           
static void setVibeAll(boolean vibe)
           
static void suppressErgo(boolean suppress)
          This function was stubbed out on Gemini.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA

public static final int JAVA
This is a value used for setRoute and getRoute. It corresponds to the audio path for sounds originating from Java.

See Also:
Constant Field Values

TWO_WAY_RADIO

public static final int TWO_WAY_RADIO
This is a value used for setRoute and getRoute. It corresponds to theaudio path of the dispatch (two-way radio) feature.

See Also:
Constant Field Values

PHONE_CALL

public static final int PHONE_CALL
This is a value used for setRoute and getRoute. It corresponds to the audio path during a phone call- speakerphone.

See Also:
Constant Field Values

SPEAKER

public static final int SPEAKER
This is a value used for setRoute and getRoute, and also a return value used in getAudioAccessoryType. It means that no accessory with audio output support in connected to the device.

See Also:
Constant Field Values

EARPIECE

public static final int EARPIECE
This is a return value used in getAudioAccessoryType. It means that no accessory with audio output support in connected to the device.

See Also:
Constant Field Values

NONE

public static final int NONE
This is a return value used in getAudioAccessoryType. It means that no accessory with audio output support in connected to the device.

See Also:
Constant Field Values

RING

public static final int RING
This is a return value used in getType and a parameter for setType. It means that audio will be played to notify the user.

See Also:
Constant Field Values

VIBRATE

public static final int VIBRATE
This is a return value used in getType and a parameter for setType. It means that a vibration will occur to notify the user.

See Also:
Constant Field Values

RING_VIBE

public static final int RING_VIBE
This is a return value used in getType and a parameter for setType. It means that a combonation of ringing and vibration will occur to notify the user.

See Also:
Constant Field Values

SILENT

public static final int SILENT
This is a return value used in getType and a parameter for setType. It means that no audible form of notification nor vibration will occur to the user.

See Also:
Constant Field Values

HEADSET_ONLY

public static final int HEADSET_ONLY
This is a return value used in getHeadset and a parameter for setHeadset. It means that when a headset is connected to the phone, audio will only go out of the earpiece of the headset.

See Also:
Constant Field Values

HEADSET_AND_SPEAKER

public static final int HEADSET_AND_SPEAKER
This is a return value used in getHeadset and a parameter for setHeadset. It means that when a headset is connected to the phone, audio can go out of the earpiece of the headset or the loudspeaker of the phone.

See Also:
Constant Field Values

MAX_RINGERS

public static final int MAX_RINGERS
This number represents the maximum number of ringers available in the phone.

See Also:
Constant Field Values
Method Detail

getControl

public static Control getControl(java.lang.String s)
This method returns an object for a particular notification, such as Line1, Line2, or CallAlert. If the string is not recognized the method returns null.

Parameters:
s - See above table for list of allowed strings.
Returns:
Control An object implementing the interfaces described int he above table.
Throws:
java.lang.SecurityException - If user does not have permission to use this API.

getRingerList

public static java.lang.String[] getRingerList()
Returns:
An array of the names of the available ringers.
Throws:
java.lang.SecurityException - If user does not have permission to use this API.

getHeadset

public static int getHeadset()
Returns:
Either HEADSET_ONLY or HEADSET_AND_SPEAKER.
Throws:
java.lang.SecurityException - If user does not have permission to use this API.

setHeadset

public static void setHeadset(int head)
                       throws java.lang.IllegalArgumentException
Parameters:
head - Either HEADSET_ONLY or HEADSET_AND_SPEAKER.
Throws:
java.lang.IllegalArgumentException - if head is not either of the two accepted values.
java.lang.SecurityException - If user does not have permission to use this API.

getVibeAll

public static boolean getVibeAll()
Returns:
True if the vibe-all setting is on, false otherwise.
Throws:
java.lang.SecurityException - If user does not have permission to use this API.

setVibeAll

public static void setVibeAll(boolean vibe)
Parameters:
vibe - Use true to turn on the vibe-all setting, false to turn off.
Throws:
java.lang.SecurityException - If user does not have permission to use this API.

suppressErgo

public static void suppressErgo(boolean suppress)
This function was stubbed out on Gemini.

Parameters:
suppress - True to suppress ergo, false to not suppress.
Throws:
java.lang.SecurityException - If user does not have permission to use this API.

getAudioAccessoryType

public static int getAudioAccessoryType()
This function was stubbed out on Gemini.

Returns:
Either NONE, SPEAKER, or EARPIECE.
Throws:
java.lang.SecurityException - If user does not have permission to use this API.