|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.media.ToneGenerator
public class ToneGenerator
This class provides methods to play DTMF tones (ITU-T Recommendation Q.23), call supervisory tones (3GPP TS 22.001, CEPT) and proprietary tones (3GPP TS 31.111). Depending on call state and routing options, tones are mixed to the downlink audio or output to the speaker phone or headset. This API is not for generating tones over the uplink audio path.
| Field Summary | |
|---|---|
static int |
MAX_VOLUME
Maximum volume, for use with ToneGenerator(int,int) |
static int |
MIN_VOLUME
Minimum volume setting, for use with ToneGenerator(int,int) |
static int |
TONE_DTMF_0
DTMF tone for key 0: 1336Hz, 941Hz, continuous |
static int |
TONE_DTMF_1
DTMF tone for key 1: 1209Hz, 697Hz, continuous |
static int |
TONE_DTMF_2
DTMF tone for key 2: 1336Hz, 697Hz, continuous |
static int |
TONE_DTMF_3
DTMF tone for key 3: 1477Hz, 697Hz, continuous |
static int |
TONE_DTMF_4
DTMF tone for key 4: 1209Hz, 770Hz, continuous |
static int |
TONE_DTMF_5
DTMF tone for key 5: 1336Hz, 770Hz, continuous |
static int |
TONE_DTMF_6
DTMF tone for key 6: 1477Hz, 770Hz, continuous |
static int |
TONE_DTMF_7
DTMF tone for key 7: 1209Hz, 852Hz, continuous |
static int |
TONE_DTMF_8
DTMF tone for key 8: 1336Hz, 852Hz, continuous |
static int |
TONE_DTMF_9
DTMF tone for key 9: 1477Hz, 852Hz, continuous |
static int |
TONE_DTMF_A
DTMF tone for key A: 1633Hz, 697Hz, continuous |
static int |
TONE_DTMF_B
DTMF tone for key B: 1633Hz, 770Hz, continuous |
static int |
TONE_DTMF_C
DTMF tone for key C: 1633Hz, 852Hz, continuous |
static int |
TONE_DTMF_D
DTMF tone for key D: 1633Hz, 941Hz, continuous |
static int |
TONE_DTMF_P
DTMF tone for key #: 1477Hz, 941Hz, continuous |
static int |
TONE_DTMF_S
DTMF tone for key *: 1209Hz, 941Hz, continuous |
static int |
TONE_PROP_ACK
Proprietary tone, positive acknowlegement: 1200Hz, 100ms ON, 100ms OFF 2 bursts |
static int |
TONE_PROP_BEEP
Proprietary tone, general beep: 400Hz+1200Hz, 35ms ON |
static int |
TONE_PROP_BEEP2
Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON |
static int |
TONE_PROP_NACK
Proprietary tone, negative acknowlegement: 300Hz+400Hz+500Hz, 400ms ON |
static int |
TONE_PROP_PROMPT
Proprietary tone, prompt tone: 400Hz+1200Hz, 200ms ON |
static int |
TONE_SUP_BUSY
Call supervisory tone, Busy: 425Hz, 500ms ON, 500ms OFF... |
static int |
TONE_SUP_CALL_WAITING
Call supervisory tone, Call Waiting: 425Hz, 200ms ON, 600ms OFF, 200ms ON, 3s OFF... |
static int |
TONE_SUP_CONGESTION
Call supervisory tone, Congestion: 425Hz, 200ms ON, 200ms OFF... |
static int |
TONE_SUP_DIAL
Call supervisory tone, Dial tone: 425Hz, continuous |
static int |
TONE_SUP_ERROR
Call supervisory tone, Error/Special info: 950Hz+1400Hz+1800Hz, 330ms ON, 1s OFF... |
static int |
TONE_SUP_RADIO_ACK
Call supervisory tone, Radio path acknowlegment : 425Hz, 200ms ON |
static int |
TONE_SUP_RADIO_NOTAVAIL
Call supervisory tone, Radio path not available: 425Hz, 200ms ON, 200 OFF 3 bursts |
static int |
TONE_SUP_RINGTONE
Call supervisory tone, Ring Tone: 425Hz, 1s ON, 4s OFF... |
| Constructor Summary | |
|---|---|
ToneGenerator(int streamType,
int volume)
ToneGenerator class contructor specifying output stream type and volume. |
|
| Method Summary | |
|---|---|
protected void |
finalize()
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. |
void |
release()
Releases resources associated with this ToneGenerator object. |
boolean |
startTone(int toneType)
This method starts the playback of a tone of the specified type. |
void |
stopTone()
This method stops the tone currently playing playback. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TONE_DTMF_0
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_1
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_2
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_3
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_4
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_5
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_6
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_7
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_8
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_9
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_S
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_P
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_A
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_B
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_C
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_DTMF_D
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_SUP_DIAL
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_SUP_BUSY
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_SUP_CONGESTION
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_SUP_RADIO_ACK
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_SUP_RADIO_NOTAVAIL
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_SUP_ERROR
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_SUP_CALL_WAITING
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_SUP_RINGTONE
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_PROP_BEEP
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_PROP_ACK
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_PROP_NACK
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_PROP_PROMPT
ToneGenerator(int, int),
Constant Field Valuespublic static final int TONE_PROP_BEEP2
ToneGenerator(int, int),
Constant Field Valuespublic static final int MAX_VOLUME
ToneGenerator(int,int)
public static final int MIN_VOLUME
ToneGenerator(int,int)
| Constructor Detail |
|---|
public ToneGenerator(int streamType,
int volume)
streamType - The streame type used for tone playback (e.g. STREAM_MUSIC).volume - The volume of the tone, given in percentage of maximum volume (from 0-100).| Method Detail |
|---|
public boolean startTone(int toneType)
toneType - The type of tone generate chosen from the following list:
TONE_DTMF_0
TONE_DTMF_1
TONE_DTMF_2
TONE_DTMF_3
TONE_DTMF_4
TONE_DTMF_5
TONE_DTMF_6
TONE_DTMF_7
TONE_DTMF_8
TONE_DTMF_9
TONE_DTMF_A
TONE_DTMF_B
TONE_DTMF_C
TONE_DTMF_D
TONE_SUP_DIAL
TONE_SUP_BUSY
TONE_SUP_CONGESTION
TONE_SUP_RADIO_ACK
TONE_SUP_RADIO_NOTAVAIL
TONE_SUP_ERROR
TONE_SUP_CALL_WAITING
TONE_SUP_RINGTONE
TONE_PROP_BEEP
TONE_PROP_ACK
TONE_PROP_NACK
TONE_PROP_PROMPT
TONE_PROP_BEEP2
ToneGenerator(int, int)public void stopTone()
ToneGenerator(int, int)public void release()
protected void finalize()
ObjectNote: The virtual machine assumes that the implementation in class Object is empty.
finalize in class Object
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||