public class

ToneGenerator

extends Object
java.lang.Object
   ↳android.media.ToneGenerator

Class Overview

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.

Summary

Constants
intMAX_VOLUMEMaximum volume, for use with ToneGenerator(int, int)
intMIN_VOLUMEMinimum volume setting, for use with ToneGenerator(int, int)
intTONE_CDMA_ABBR_ALERTCDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON
intTONE_CDMA_ABBR_INTERCEPTCDMA Abbr Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON
intTONE_CDMA_ABBR_REORDERCDMA Abbr Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF repeated for 8 times
intTONE_CDMA_ALERT_AUTOREDIAL_LITECDMA Alert Auto Redial tone: {1245Hz 62ms ON, 659Hz 62ms ON} 3 times, 1245 62ms ON
intTONE_CDMA_ALERT_CALL_GUARDCDMA ALERT CALL GUARD tone: {1319Hz 125ms ON, 125ms OFF} 3 times
intTONE_CDMA_ALERT_INCALL_LITECDMA ALERT INCALL LITE tone: 587Hz 62ms, 784 62ms, 831Hz 62ms, 784Hz 62ms, 1109 62ms, 784Hz 62ms, 831Hz 62ms, 784Hz 62ms
intTONE_CDMA_ALERT_NETWORK_LITECDMA Alert Network Lite tone: 1109Hz 62ms ON, 784Hz 62ms ON, 740Hz 62ms ON 622Hz 62ms ON, 1109Hz 62ms ON
intTONE_CDMA_ANSWERCDMA answer tone: silent tone - defintion Frequency 0, 0ms ON, 0ms OFF
intTONE_CDMA_CALLDROP_LITECDMA CALLDROP LITE tone: 1480Hz 125ms, 1397Hz 125ms, 784Hz 125ms
intTONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUPISDN Call Signal Intergroup tone: {2091Hz 32ms ON, 2556 64ms ON} 8 times, 2091Hz 32ms ON, 400ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} times, 2091Hz 32ms ON, 4s OFF.
intTONE_CDMA_CALL_SIGNAL_ISDN_NORMALISDN Call Signal Normal tone: {2091Hz 32ms ON, 2556 64ms ON} 20 times, 2091 32ms ON, 2556 48ms ON, 4s OFF
intTONE_CDMA_CALL_SIGNAL_ISDN_PAT3ISDN Call sign PAT3 tone: silent tone
intTONE_CDMA_CALL_SIGNAL_ISDN_PAT5ISDN Pat5 tone: silent tone
intTONE_CDMA_CALL_SIGNAL_ISDN_PAT6ISDN Pat6 tone: silent tone
intTONE_CDMA_CALL_SIGNAL_ISDN_PAT7ISDN Pat7 tone: silent tone
intTONE_CDMA_CALL_SIGNAL_ISDN_PING_RINGISDN Ping Ring tone: {2091Hz 32ms ON, 2556Hz 64ms ON} 5 times 2091Hz 20ms ON
intTONE_CDMA_CALL_SIGNAL_ISDN_SP_PRIISDN Call Signal SP PRI tone:{2091Hz 32ms ON, 2556 64ms ON} 4 times 2091Hz 16ms ON, 200ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} 4 times, 2091Hz 16ms ON, 200ms OFF
intTONE_CDMA_CONFIRMCDMA Confirm tone: 350Hz+440Hz 100ms ON, 100ms OFF repeated for 3 times
intTONE_CDMA_DIAL_TONE_LITECDMA Dial tone : 425Hz continuous
intTONE_CDMA_EMERGENCY_RINGBACKCDMA EMERGENCY RINGBACK tone: {941Hz 125ms ON, 10ms OFF} 3times 4990ms OFF, REPEAT...
intTONE_CDMA_HIGH_LTONE_CDMA_HIGH_L tone: {3700Hz 25ms, 4000Hz 25ms} 40 times 4000ms OFF, Repeat ....
intTONE_CDMA_HIGH_PBX_LCDMA HIGH PBX L: {3700Hz 25ms, 4000Hz 25ms}20 times, 2000ms OFF, REPEAT....
intTONE_CDMA_HIGH_PBX_SLSCDMA HIGH PBX SSL tone:{3700Hz 25ms, 4000Hz 25ms} 8 times 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 1000ms OFF, REPEAT....
intTONE_CDMA_HIGH_PBX_SSCDMA HIGH PBX SS tone: {3700Hz 25ms, 4000Hz 25ms} 8 times 200 ms OFF, {3700Hz 25ms 4000Hz 25ms}8 times, 2000ms OFF, REPEAT....
intTONE_CDMA_HIGH_PBX_SSLCDMA HIGH PBX SSL tone:{3700Hz 25ms, 4000Hz 25ms} 8 times 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 1000ms OFF, REPEAT....
intTONE_CDMA_HIGH_PBX_S_X4CDMA HIGH PBX X S4 tone: {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 800ms OFF, REPEAT...
intTONE_CDMA_HIGH_SLSCDMA HIGH SLS tone: {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 3000ms OFF, REPEAT
intTONE_CDMA_HIGH_SSCDMA HIGH SS tone: {3700Hz 25ms, 4000Hz 25ms} repeat 16 times, 400ms OFF, repeat ....
intTONE_CDMA_HIGH_SSLCDMA HIGH SSL tone: {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 16 times, 4000ms OFF, repeat ...
intTONE_CDMA_HIGH_SS_2CDMA HIGH SS2 tone: {3700Hz 25ms, 4000Hz 25ms} 20 times, 1000ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 3000ms OFF, repeat ....
intTONE_CDMA_HIGH_S_X4CDMA HIGH S X4 tone: {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 2500ms OFF, REPEAT....
intTONE_CDMA_INTERCEPTCDMA Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON ...
intTONE_CDMA_KEYPAD_VOLUME_KEY_LITECDMA KEYPAD Volume key lite tone: 941Hz+1477Hz 120ms ON
intTONE_CDMA_LOW_LTONE_CDMA_LOW_L tone: {1300Hz 25ms, 1450Hz 25ms} 40 times, 4000ms OFF, Repeat ....
intTONE_CDMA_LOW_PBX_LCDMA LOW PBX L: {1300Hz 25ms,1450Hz 25ms}20 times, 2000ms OFF, REPEAT....
intTONE_CDMA_LOW_PBX_SLSCDMA HIGH PBX SLS tone:{1300Hz 25ms, 1450Hz 25ms} 8 times 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 1000ms OFF, REPEAT....
intTONE_CDMA_LOW_PBX_SSCDMA LOW PBX SS tone: {1300Hz 25ms, 1450Hz 25ms} 8 times 200 ms OFF, {1300Hz 25ms 1450Hz 25ms}8 times, 2000ms OFF, REPEAT....
intTONE_CDMA_LOW_PBX_SSLCDMA LOW PBX SSL tone:{1300Hz 25ms, 1450Hz 25ms} 8 times 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 1000ms OFF, REPEAT....
intTONE_CDMA_LOW_PBX_S_X4CDMA LOW PBX X S4 tone: {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 800ms OFF, REPEAT...
intTONE_CDMA_LOW_SLSCDMA LOW SLS tone: {1300Hz 25ms, 1450Hz 25ms} 10 times, 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 10 times, 3000ms OFF, REPEAT
intTONE_CDMA_LOW_SSCDMA LOW SS tone: {1300z 25ms, 1450Hz 25ms} repeat 16 times, 400ms OFF, repeat ....
intTONE_CDMA_LOW_SSLCDMA LOW SSL tone: {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 16 times, 4000ms OFF, repeat ...
intTONE_CDMA_LOW_SS_2CDMA LOW SS2 tone: {1300Hz 25ms, 1450Hz 25ms} 20 times, 1000ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 3000ms OFF, repeat ....
intTONE_CDMA_LOW_S_X4CDMA LOW S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT....
intTONE_CDMA_MED_LTONE_CDMA_MED_L tone: {2600Hz 25ms, 2900Hz 25ms} 40 times 4000ms OFF, Repeat ....
intTONE_CDMA_MED_PBX_LCDMA MED PBX L: {2600Hz 25ms, 2900Hz 25ms}20 times, 2000ms OFF, REPEAT....
intTONE_CDMA_MED_PBX_SLSCDMA HIGH PBX SLS tone:{2600Hz 25ms, 2900Hz 25ms} 8 times 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 1000ms OFF, REPEAT....
intTONE_CDMA_MED_PBX_SSCDMA MED PBX SS tone: {2600Hz 25ms, 2900Hz 25ms} 8 times 200 ms OFF, {2600Hz 25ms 2900Hz 25ms}8 times, 2000ms OFF, REPEAT....
intTONE_CDMA_MED_PBX_SSLCDMA MED PBX SSL tone:{2600Hz 25ms, 2900Hz 25ms} 8 times 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 1000ms OFF, REPEAT....
intTONE_CDMA_MED_PBX_S_X4CDMA MED PBX X S4 tone: {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 800ms OFF, REPEAT...
intTONE_CDMA_MED_SLSCDMA MED SLS tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 3000ms OFF, REPEAT
intTONE_CDMA_MED_SSCDMA MED SS tone: {2600Hz 25ms, 2900Hz 25ms} repeat 16 times, 400ms OFF, repeat ....
intTONE_CDMA_MED_SSLCDMA MED SSL tone: {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 16 times, 4000ms OFF, repeat ...
intTONE_CDMA_MED_SS_2CDMA MED SS2 tone: {2600Hz 25ms, 2900Hz 25ms} 20 times, 1000ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 3000ms OFF, repeat ....
intTONE_CDMA_MED_S_X4CDMA MED S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT....
intTONE_CDMA_NETWORK_BUSYCDMA Network Busy tone: 480Hz+620Hz 500ms ON, 500ms OFF continuous
intTONE_CDMA_NETWORK_BUSY_ONE_SHOTCDMA_NETWORK_BUSY_ONE_SHOT tone: 425Hz 500ms ON, 500ms OFF.
intTONE_CDMA_NETWORK_CALLWAITINGCDMA Network Callwaiting tone: 440Hz 300ms ON
intTONE_CDMA_NETWORK_USA_RINGBACKCDMA USA Ringback: 440Hz+480Hz 2s ON, 4000 OFF ...
intTONE_CDMA_ONE_MIN_BEEPCDMA One Min Beep tone: 1150Hz+770Hz 400ms ON
intTONE_CDMA_PIPCDMA PIP tone: 480Hz 100ms ON, 100ms OFF repeated for 4 times
intTONE_CDMA_PRESSHOLDKEY_LITECDMA PRESSHOLDKEY LITE tone: 587Hz 375ms ON, 1175Hz 125ms ON
intTONE_CDMA_REORDERCDMA Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF...
intTONE_CDMA_SIGNAL_OFFCDMA_SIGNAL_OFF - silent tone
intTONE_CDMA_SOFT_ERROR_LITECDMA SOFT ERROR LITE tone: 1047Hz 125ms ON, 370Hz 125ms
intTONE_DTMF_0DTMF tone for key 0: 1336Hz, 941Hz, continuous
intTONE_DTMF_1DTMF tone for key 1: 1209Hz, 697Hz, continuous
intTONE_DTMF_2DTMF tone for key 2: 1336Hz, 697Hz, continuous
intTONE_DTMF_3DTMF tone for key 3: 1477Hz, 697Hz, continuous
intTONE_DTMF_4DTMF tone for key 4: 1209Hz, 770Hz, continuous
intTONE_DTMF_5DTMF tone for key 5: 1336Hz, 770Hz, continuous
intTONE_DTMF_6DTMF tone for key 6: 1477Hz, 770Hz, continuous
intTONE_DTMF_7DTMF tone for key 7: 1209Hz, 852Hz, continuous
intTONE_DTMF_8DTMF tone for key 8: 1336Hz, 852Hz, continuous
intTONE_DTMF_9DTMF tone for key 9: 1477Hz, 852Hz, continuous
intTONE_DTMF_ADTMF tone for key A: 1633Hz, 697Hz, continuous
intTONE_DTMF_BDTMF tone for key B: 1633Hz, 770Hz, continuous
intTONE_DTMF_CDTMF tone for key C: 1633Hz, 852Hz, continuous
intTONE_DTMF_DDTMF tone for key D: 1633Hz, 941Hz, continuous
intTONE_DTMF_PDTMF tone for key #: 1477Hz, 941Hz, continuous
intTONE_DTMF_SDTMF tone for key *: 1209Hz, 941Hz, continuous
intTONE_PROP_ACKProprietary tone, positive acknowlegement: 1200Hz, 100ms ON, 100ms OFF 2 bursts
intTONE_PROP_BEEPProprietary tone, general beep: 400Hz+1200Hz, 35ms ON
intTONE_PROP_BEEP2Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON
intTONE_PROP_NACKProprietary tone, negative acknowlegement: 300Hz+400Hz+500Hz, 400ms ON
intTONE_PROP_PROMPTProprietary tone, prompt tone: 400Hz+1200Hz, 200ms ON
intTONE_SUP_BUSYCall supervisory tone, Busy: CEPT: 425Hz, 500ms ON, 500ms OFF...
intTONE_SUP_CALL_WAITINGCall supervisory tone, Call Waiting: CEPT, JAPAN: 425Hz, 200ms ON, 600ms OFF, 200ms ON, 3s OFF...
intTONE_SUP_CONFIRMCall supervisory tone (IS-95), confirm tone: a 350 Hz tone added to a 440 Hz tone repeated 3 times in a 100 ms on, 100 ms off cycle
intTONE_SUP_CONGESTIONCall supervisory tone, Congestion: CEPT, JAPAN: 425Hz, 200ms ON, 200ms OFF...
intTONE_SUP_CONGESTION_ABBREVCall supervisory tone (IS-95), abbreviated congestion: congestion tone limited to 4 seconds
intTONE_SUP_DIALCall supervisory tone, Dial tone: CEPT: 425Hz, continuous ANSI (IS-95): 350Hz+440Hz, continuous JAPAN: 400Hz, continuous
intTONE_SUP_ERRORCall supervisory tone, Error/Special info: 950Hz+1400Hz+1800Hz, 330ms ON, 1s OFF...
intTONE_SUP_INTERCEPTCall supervisory tone (IS-95), intercept tone: alternating 440 Hz and 620 Hz tones, each on for 250 ms
intTONE_SUP_INTERCEPT_ABBREVCall supervisory tone (IS-95), abbreviated intercept: intercept tone limited to 4 seconds
intTONE_SUP_PIPCall supervisory tone (IS-95), pip tone: four bursts of 480 Hz tone (0.1 s on, 0.1 s off).
intTONE_SUP_RADIO_ACKCall supervisory tone, Radio path acknowlegment : CEPT, ANSI: 425Hz, 200ms ON JAPAN: 400Hz, 1s ON, 2s OFF...
intTONE_SUP_RADIO_NOTAVAILCall supervisory tone, Radio path not available: 425Hz, 200ms ON, 200 OFF 3 bursts
intTONE_SUP_RINGTONECall supervisory tone, Ring Tone: CEPT, JAPAN: 425Hz, 1s ON, 4s OFF...
Public Constructors
ToneGenerator(int streamType, int volume)
ToneGenerator class contructor specifying output stream type and volume.
Public Methods
void release()
Releases resources associated with this ToneGenerator object.
boolean startTone(int toneType, int durationMs)
This method starts the playback of a tone of the specified type for the specified duration.
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.
Protected Methods
void finalize()
Called before the object's memory is reclaimed by the VM.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int MAX_VOLUME

Since: API Level 1

Maximum volume, for use with ToneGenerator(int, int)

Constant Value: 100 (0x00000064)

public static final int MIN_VOLUME

Since: API Level 1

Minimum volume setting, for use with ToneGenerator(int, int)

Constant Value: 0 (0x00000000)

public static final int TONE_CDMA_ABBR_ALERT

Since: API Level 4

CDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON

Constant Value: 97 (0x00000061)

public static final int TONE_CDMA_ABBR_INTERCEPT

Since: API Level 4

CDMA Abbr Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON

Constant Value: 37 (0x00000025)

public static final int TONE_CDMA_ABBR_REORDER

Since: API Level 4

CDMA Abbr Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF repeated for 8 times

Constant Value: 39 (0x00000027)

public static final int TONE_CDMA_ALERT_AUTOREDIAL_LITE

Since: API Level 4

CDMA Alert Auto Redial tone: {1245Hz 62ms ON, 659Hz 62ms ON} 3 times, 1245 62ms ON

Constant Value: 87 (0x00000057)

public static final int TONE_CDMA_ALERT_CALL_GUARD

Since: API Level 4

CDMA ALERT CALL GUARD tone: {1319Hz 125ms ON, 125ms OFF} 3 times

Constant Value: 93 (0x0000005d)

public static final int TONE_CDMA_ALERT_INCALL_LITE

Since: API Level 4

CDMA ALERT INCALL LITE tone: 587Hz 62ms, 784 62ms, 831Hz 62ms, 784Hz 62ms, 1109 62ms, 784Hz 62ms, 831Hz 62ms, 784Hz 62ms

Constant Value: 91 (0x0000005b)

public static final int TONE_CDMA_ALERT_NETWORK_LITE

Since: API Level 4

CDMA Alert Network Lite tone: 1109Hz 62ms ON, 784Hz 62ms ON, 740Hz 62ms ON 622Hz 62ms ON, 1109Hz 62ms ON

Constant Value: 86 (0x00000056)

public static final int TONE_CDMA_ANSWER

Since: API Level 4

CDMA answer tone: silent tone - defintion Frequency 0, 0ms ON, 0ms OFF

Constant Value: 42 (0x0000002a)

public static final int TONE_CDMA_CALLDROP_LITE

Since: API Level 4

CDMA CALLDROP LITE tone: 1480Hz 125ms, 1397Hz 125ms, 784Hz 125ms

Constant Value: 95 (0x0000005f)

public static final int TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP

Since: API Level 4

ISDN Call Signal Intergroup tone: {2091Hz 32ms ON, 2556 64ms ON} 8 times, 2091Hz 32ms ON, 400ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} times, 2091Hz 32ms ON, 4s OFF.

Constant Value: 46 (0x0000002e)

public static final int TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL

Since: API Level 4

ISDN Call Signal Normal tone: {2091Hz 32ms ON, 2556 64ms ON} 20 times, 2091 32ms ON, 2556 48ms ON, 4s OFF

Constant Value: 45 (0x0000002d)

public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT3

Since: API Level 4

ISDN Call sign PAT3 tone: silent tone

Constant Value: 48 (0x00000030)

public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT5

Since: API Level 4

ISDN Pat5 tone: silent tone

Constant Value: 50 (0x00000032)

public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT6

Since: API Level 4

ISDN Pat6 tone: silent tone

Constant Value: 51 (0x00000033)

public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PAT7

Since: API Level 4

ISDN Pat7 tone: silent tone

Constant Value: 52 (0x00000034)

public static final int TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING

Since: API Level 4

ISDN Ping Ring tone: {2091Hz 32ms ON, 2556Hz 64ms ON} 5 times 2091Hz 20ms ON

Constant Value: 49 (0x00000031)

public static final int TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI

Since: API Level 4

ISDN Call Signal SP PRI tone:{2091Hz 32ms ON, 2556 64ms ON} 4 times 2091Hz 16ms ON, 200ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} 4 times, 2091Hz 16ms ON, 200ms OFF

Constant Value: 47 (0x0000002f)

public static final int TONE_CDMA_CONFIRM

Since: API Level 4

CDMA Confirm tone: 350Hz+440Hz 100ms ON, 100ms OFF repeated for 3 times

Constant Value: 41 (0x00000029)

public static final int TONE_CDMA_DIAL_TONE_LITE

Since: API Level 4

CDMA Dial tone : 425Hz continuous

Constant Value: 34 (0x00000022)

public static final int TONE_CDMA_EMERGENCY_RINGBACK

Since: API Level 4

CDMA EMERGENCY RINGBACK tone: {941Hz 125ms ON, 10ms OFF} 3times 4990ms OFF, REPEAT...

Constant Value: 92 (0x0000005c)

public static final int TONE_CDMA_HIGH_L

Since: API Level 4

TONE_CDMA_HIGH_L tone: {3700Hz 25ms, 4000Hz 25ms} 40 times 4000ms OFF, Repeat ....

Constant Value: 53 (0x00000035)

public static final int TONE_CDMA_HIGH_PBX_L

Since: API Level 4

CDMA HIGH PBX L: {3700Hz 25ms, 4000Hz 25ms}20 times, 2000ms OFF, REPEAT....

Constant Value: 71 (0x00000047)

public static final int TONE_CDMA_HIGH_PBX_SLS

Since: API Level 4

CDMA HIGH PBX SSL tone:{3700Hz 25ms, 4000Hz 25ms} 8 times 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 1000ms OFF, REPEAT....

Constant Value: 80 (0x00000050)

public static final int TONE_CDMA_HIGH_PBX_SS

Since: API Level 4

CDMA HIGH PBX SS tone: {3700Hz 25ms, 4000Hz 25ms} 8 times 200 ms OFF, {3700Hz 25ms 4000Hz 25ms}8 times, 2000ms OFF, REPEAT....

Constant Value: 74 (0x0000004a)

public static final int TONE_CDMA_HIGH_PBX_SSL

Since: API Level 4

CDMA HIGH PBX SSL tone:{3700Hz 25ms, 4000Hz 25ms} 8 times 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 1000ms OFF, REPEAT....

Constant Value: 77 (0x0000004d)

public static final int TONE_CDMA_HIGH_PBX_S_X4

Since: API Level 4

CDMA HIGH PBX X S4 tone: {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 800ms OFF, REPEAT...

Constant Value: 83 (0x00000053)

public static final int TONE_CDMA_HIGH_SLS

Since: API Level 4

CDMA HIGH SLS tone: {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 3000ms OFF, REPEAT

Constant Value: 65 (0x00000041)

public static final int TONE_CDMA_HIGH_SS

Since: API Level 4

CDMA HIGH SS tone: {3700Hz 25ms, 4000Hz 25ms} repeat 16 times, 400ms OFF, repeat ....

Constant Value: 56 (0x00000038)

public static final int TONE_CDMA_HIGH_SSL

Since: API Level 4

CDMA HIGH SSL tone: {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 16 times, 4000ms OFF, repeat ...

Constant Value: 59 (0x0000003b)

public static final int TONE_CDMA_HIGH_SS_2

Since: API Level 4

CDMA HIGH SS2 tone: {3700Hz 25ms, 4000Hz 25ms} 20 times, 1000ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 3000ms OFF, repeat ....

Constant Value: 62 (0x0000003e)

public static final int TONE_CDMA_HIGH_S_X4

Since: API Level 4

CDMA HIGH S X4 tone: {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 2500ms OFF, REPEAT....

Constant Value: 68 (0x00000044)

public static final int TONE_CDMA_INTERCEPT

Since: API Level 4

CDMA Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON ...

Constant Value: 36 (0x00000024)

public static final int TONE_CDMA_KEYPAD_VOLUME_KEY_LITE

Since: API Level 4

CDMA KEYPAD Volume key lite tone: 941Hz+1477Hz 120ms ON

Constant Value: 89 (0x00000059)

public static final int TONE_CDMA_LOW_L

Since: API Level 4

TONE_CDMA_LOW_L tone: {1300Hz 25ms, 1450Hz 25ms} 40 times, 4000ms OFF, Repeat ....

Constant Value: 55 (0x00000037)

public static final int TONE_CDMA_LOW_PBX_L

Since: API Level 4

CDMA LOW PBX L: {1300Hz 25ms,1450Hz 25ms}20 times, 2000ms OFF, REPEAT....

Constant Value: 73 (0x00000049)

public static final int TONE_CDMA_LOW_PBX_SLS

Since: API Level 4

CDMA HIGH PBX SLS tone:{1300Hz 25ms, 1450Hz 25ms} 8 times 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 1000ms OFF, REPEAT....

Constant Value: 82 (0x00000052)

public static final int TONE_CDMA_LOW_PBX_SS

Since: API Level 4

CDMA LOW PBX SS tone: {1300Hz 25ms, 1450Hz 25ms} 8 times 200 ms OFF, {1300Hz 25ms 1450Hz 25ms}8 times, 2000ms OFF, REPEAT....

Constant Value: 76 (0x0000004c)

public static final int TONE_CDMA_LOW_PBX_SSL

Since: API Level 4

CDMA LOW PBX SSL tone:{1300Hz 25ms, 1450Hz 25ms} 8 times 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 1000ms OFF, REPEAT....

Constant Value: 79 (0x0000004f)

public static final int TONE_CDMA_LOW_PBX_S_X4

Since: API Level 4

CDMA LOW PBX X S4 tone: {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 800ms OFF, REPEAT...

Constant Value: 85 (0x00000055)

public static final int TONE_CDMA_LOW_SLS

Since: API Level 4

CDMA LOW SLS tone: {1300Hz 25ms, 1450Hz 25ms} 10 times, 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 10 times, 3000ms OFF, REPEAT

Constant Value: 67 (0x00000043)

public static final int TONE_CDMA_LOW_SS

Since: API Level 4

CDMA LOW SS tone: {1300z 25ms, 1450Hz 25ms} repeat 16 times, 400ms OFF, repeat ....

Constant Value: 58 (0x0000003a)

public static final int TONE_CDMA_LOW_SSL

Since: API Level 4

CDMA LOW SSL tone: {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 16 times, 4000ms OFF, repeat ...

Constant Value: 61 (0x0000003d)

public static final int TONE_CDMA_LOW_SS_2

Since: API Level 4

CDMA LOW SS2 tone: {1300Hz 25ms, 1450Hz 25ms} 20 times, 1000ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 3000ms OFF, repeat ....

Constant Value: 64 (0x00000040)

public static final int TONE_CDMA_LOW_S_X4

Since: API Level 4

CDMA LOW S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT....

Constant Value: 70 (0x00000046)

public static final int TONE_CDMA_MED_L

Since: API Level 4

TONE_CDMA_MED_L tone: {2600Hz 25ms, 2900Hz 25ms} 40 times 4000ms OFF, Repeat ....

Constant Value: 54 (0x00000036)

public static final int TONE_CDMA_MED_PBX_L

Since: API Level 4

CDMA MED PBX L: {2600Hz 25ms, 2900Hz 25ms}20 times, 2000ms OFF, REPEAT....

Constant Value: 72 (0x00000048)

public static final int TONE_CDMA_MED_PBX_SLS

Since: API Level 4

CDMA HIGH PBX SLS tone:{2600Hz 25ms, 2900Hz 25ms} 8 times 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 1000ms OFF, REPEAT....

Constant Value: 81 (0x00000051)

public static final int TONE_CDMA_MED_PBX_SS

Since: API Level 4

CDMA MED PBX SS tone: {2600Hz 25ms, 2900Hz 25ms} 8 times 200 ms OFF, {2600Hz 25ms 2900Hz 25ms}8 times, 2000ms OFF, REPEAT....

Constant Value: 75 (0x0000004b)

public static final int TONE_CDMA_MED_PBX_SSL

Since: API Level 4

CDMA MED PBX SSL tone:{2600Hz 25ms, 2900Hz 25ms} 8 times 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 1000ms OFF, REPEAT....

Constant Value: 78 (0x0000004e)

public static final int TONE_CDMA_MED_PBX_S_X4

Since: API Level 4

CDMA MED PBX X S4 tone: {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 800ms OFF, REPEAT...

Constant Value: 84 (0x00000054)

public static final int TONE_CDMA_MED_SLS

Since: API Level 4

CDMA MED SLS tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 3000ms OFF, REPEAT

Constant Value: 66 (0x00000042)

public static final int TONE_CDMA_MED_SS

Since: API Level 4

CDMA MED SS tone: {2600Hz 25ms, 2900Hz 25ms} repeat 16 times, 400ms OFF, repeat ....

Constant Value: 57 (0x00000039)

public static final int TONE_CDMA_MED_SSL

Since: API Level 4

CDMA MED SSL tone: {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 16 times, 4000ms OFF, repeat ...

Constant Value: 60 (0x0000003c)

public static final int TONE_CDMA_MED_SS_2

Since: API Level 4

CDMA MED SS2 tone: {2600Hz 25ms, 2900Hz 25ms} 20 times, 1000ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 3000ms OFF, repeat ....

Constant Value: 63 (0x0000003f)

public static final int TONE_CDMA_MED_S_X4

Since: API Level 4

CDMA MED S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT....

Constant Value: 69 (0x00000045)

public static final int TONE_CDMA_NETWORK_BUSY

Since: API Level 4

CDMA Network Busy tone: 480Hz+620Hz 500ms ON, 500ms OFF continuous

Constant Value: 40 (0x00000028)

public static final int TONE_CDMA_NETWORK_BUSY_ONE_SHOT

Since: API Level 4

CDMA_NETWORK_BUSY_ONE_SHOT tone: 425Hz 500ms ON, 500ms OFF.

Constant Value: 96 (0x00000060)

public static final int TONE_CDMA_NETWORK_CALLWAITING

Since: API Level 4

CDMA Network Callwaiting tone: 440Hz 300ms ON

Constant Value: 43 (0x0000002b)

public static final int TONE_CDMA_NETWORK_USA_RINGBACK

Since: API Level 4

CDMA USA Ringback: 440Hz+480Hz 2s ON, 4000 OFF ...

Constant Value: 35 (0x00000023)

public static final int TONE_CDMA_ONE_MIN_BEEP

Since: API Level 4

CDMA One Min Beep tone: 1150Hz+770Hz 400ms ON

Constant Value: 88 (0x00000058)

public static final int TONE_CDMA_PIP

Since: API Level 4

CDMA PIP tone: 480Hz 100ms ON, 100ms OFF repeated for 4 times

Constant Value: 44 (0x0000002c)

public static final int TONE_CDMA_PRESSHOLDKEY_LITE

Since: API Level 4

CDMA PRESSHOLDKEY LITE tone: 587Hz 375ms ON, 1175Hz 125ms ON

Constant Value: 90 (0x0000005a)

public static final int TONE_CDMA_REORDER

Since: API Level 4

CDMA Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF...

Constant Value: 38 (0x00000026)

public static final int TONE_CDMA_SIGNAL_OFF

Since: API Level 4

CDMA_SIGNAL_OFF - silent tone

Constant Value: 98 (0x00000062)

public static final int TONE_CDMA_SOFT_ERROR_LITE

Since: API Level 4

CDMA SOFT ERROR LITE tone: 1047Hz 125ms ON, 370Hz 125ms

Constant Value: 94 (0x0000005e)

public static final int TONE_DTMF_0

Since: API Level 1

DTMF tone for key 0: 1336Hz, 941Hz, continuous

Constant Value: 0 (0x00000000)

public static final int TONE_DTMF_1

Since: API Level 1

DTMF tone for key 1: 1209Hz, 697Hz, continuous

Constant Value: 1 (0x00000001)

public static final int TONE_DTMF_2

Since: API Level 1

DTMF tone for key 2: 1336Hz, 697Hz, continuous

Constant Value: 2 (0x00000002)

public static final int TONE_DTMF_3

Since: API Level 1

DTMF tone for key 3: 1477Hz, 697Hz, continuous

Constant Value: 3 (0x00000003)

public static final int TONE_DTMF_4

Since: API Level 1

DTMF tone for key 4: 1209Hz, 770Hz, continuous

Constant Value: 4 (0x00000004)

public static final int TONE_DTMF_5

Since: API Level 1

DTMF tone for key 5: 1336Hz, 770Hz, continuous

Constant Value: 5 (0x00000005)

public static final int TONE_DTMF_6

Since: API Level 1

DTMF tone for key 6: 1477Hz, 770Hz, continuous

Constant Value: 6 (0x00000006)

public static final int TONE_DTMF_7

Since: API Level 1

DTMF tone for key 7: 1209Hz, 852Hz, continuous

Constant Value: 7 (0x00000007)

public static final int TONE_DTMF_8

Since: API Level 1

DTMF tone for key 8: 1336Hz, 852Hz, continuous

Constant Value: 8 (0x00000008)

public static final int TONE_DTMF_9

Since: API Level 1

DTMF tone for key 9: 1477Hz, 852Hz, continuous

Constant Value: 9 (0x00000009)

public static final int TONE_DTMF_A

Since: API Level 1

DTMF tone for key A: 1633Hz, 697Hz, continuous

Constant Value: 12 (0x0000000c)

public static final int TONE_DTMF_B

Since: API Level 1

DTMF tone for key B: 1633Hz, 770Hz, continuous

Constant Value: 13 (0x0000000d)

public static final int TONE_DTMF_C

Since: API Level 1

DTMF tone for key C: 1633Hz, 852Hz, continuous

Constant Value: 14 (0x0000000e)

public static final int TONE_DTMF_D

Since: API Level 1

DTMF tone for key D: 1633Hz, 941Hz, continuous

Constant Value: 15 (0x0000000f)

public static final int TONE_DTMF_P

Since: API Level 1

DTMF tone for key #: 1477Hz, 941Hz, continuous

Constant Value: 11 (0x0000000b)

public static final int TONE_DTMF_S

Since: API Level 1

DTMF tone for key *: 1209Hz, 941Hz, continuous

Constant Value: 10 (0x0000000a)

public static final int TONE_PROP_ACK

Since: API Level 1

Proprietary tone, positive acknowlegement: 1200Hz, 100ms ON, 100ms OFF 2 bursts

Constant Value: 25 (0x00000019)

public static final int TONE_PROP_BEEP

Since: API Level 1

Proprietary tone, general beep: 400Hz+1200Hz, 35ms ON

Constant Value: 24 (0x00000018)

public static final int TONE_PROP_BEEP2

Since: API Level 1

Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON

Constant Value: 28 (0x0000001c)

public static final int TONE_PROP_NACK

Since: API Level 1

Proprietary tone, negative acknowlegement: 300Hz+400Hz+500Hz, 400ms ON

Constant Value: 26 (0x0000001a)

public static final int TONE_PROP_PROMPT

Since: API Level 1

Proprietary tone, prompt tone: 400Hz+1200Hz, 200ms ON

Constant Value: 27 (0x0000001b)

public static final int TONE_SUP_BUSY

Since: API Level 1

Call supervisory tone, Busy: CEPT: 425Hz, 500ms ON, 500ms OFF... ANSI (IS-95): 480Hz+620Hz, 500ms ON, 500ms OFF... JAPAN: 400Hz, 500ms ON, 500ms OFF...

Constant Value: 17 (0x00000011)

public static final int TONE_SUP_CALL_WAITING

Since: API Level 1

Call supervisory tone, Call Waiting: CEPT, JAPAN: 425Hz, 200ms ON, 600ms OFF, 200ms ON, 3s OFF... ANSI (IS-95): 440 Hz, 300 ms ON, 9.7 s OFF, (100 ms ON, 100 ms OFF, 100 ms ON, 9.7s OFF ...)

Constant Value: 22 (0x00000016)

public static final int TONE_SUP_CONFIRM

Since: API Level 4

Call supervisory tone (IS-95), confirm tone: a 350 Hz tone added to a 440 Hz tone repeated 3 times in a 100 ms on, 100 ms off cycle

Constant Value: 32 (0x00000020)

public static final int TONE_SUP_CONGESTION

Since: API Level 1

Call supervisory tone, Congestion: CEPT, JAPAN: 425Hz, 200ms ON, 200ms OFF... ANSI (IS-95): 480Hz+620Hz, 250ms ON, 250ms OFF...

Constant Value: 18 (0x00000012)

public static final int TONE_SUP_CONGESTION_ABBREV

Since: API Level 4

Call supervisory tone (IS-95), abbreviated congestion: congestion tone limited to 4 seconds

Constant Value: 31 (0x0000001f)

public static final int TONE_SUP_DIAL

Since: API Level 1

Call supervisory tone, Dial tone: CEPT: 425Hz, continuous ANSI (IS-95): 350Hz+440Hz, continuous JAPAN: 400Hz, continuous

Constant Value: 16 (0x00000010)

public static final int TONE_SUP_ERROR

Since: API Level 1

Call supervisory tone, Error/Special info: 950Hz+1400Hz+1800Hz, 330ms ON, 1s OFF...

Constant Value: 21 (0x00000015)

public static final int TONE_SUP_INTERCEPT

Since: API Level 4

Call supervisory tone (IS-95), intercept tone: alternating 440 Hz and 620 Hz tones, each on for 250 ms

Constant Value: 29 (0x0000001d)

public static final int TONE_SUP_INTERCEPT_ABBREV

Since: API Level 4

Call supervisory tone (IS-95), abbreviated intercept: intercept tone limited to 4 seconds

Constant Value: 30 (0x0000001e)

public static final int TONE_SUP_PIP

Since: API Level 4

Call supervisory tone (IS-95), pip tone: four bursts of 480 Hz tone (0.1 s on, 0.1 s off).

Constant Value: 33 (0x00000021)

public static final int TONE_SUP_RADIO_ACK

Since: API Level 1

Call supervisory tone, Radio path acknowlegment : CEPT, ANSI: 425Hz, 200ms ON JAPAN: 400Hz, 1s ON, 2s OFF...

Constant Value: 19 (0x00000013)

public static final int TONE_SUP_RADIO_NOTAVAIL

Since: API Level 1

Call supervisory tone, Radio path not available: 425Hz, 200ms ON, 200 OFF 3 bursts

Constant Value: 20 (0x00000014)

public static final int TONE_SUP_RINGTONE

Since: API Level 1

Call supervisory tone, Ring Tone: CEPT, JAPAN: 425Hz, 1s ON, 4s OFF... ANSI (IS-95): 440Hz + 480Hz, 2s ON, 4s OFF...

Constant Value: 23 (0x00000017)

Public Constructors

public ToneGenerator (int streamType, int volume)

Since: API Level 1

ToneGenerator class contructor specifying output stream type and volume.

Parameters
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).

Public Methods

public void release ()

Since: API Level 1

Releases resources associated with this ToneGenerator object. It is good practice to call this method when you're done using the ToneGenerator.

public boolean startTone (int toneType, int durationMs)

Since: API Level 5

This method starts the playback of a tone of the specified type for the specified duration.

Parameters
toneType The type of tone generated @see startTone(int).
durationMs The tone duration in milliseconds. If the tone is limited in time by definition, the actual duration will be the minimum of durationMs and the defined tone duration. Setting durationMs to -1, is equivalent to calling startTone(int).

public boolean startTone (int toneType)

Since: API Level 1

This method starts the playback of a tone of the specified type. only one tone can play at a time: if a tone is playing while this method is called, this tone is stopped and replaced by the one requested.

Parameters
toneType The type of tone generated chosen from the following list:

public void stopTone ()

Since: API Level 1

This method stops the tone currently playing playback.

Protected Methods

protected void finalize ()

Since: API Level 1

Called before the object's memory is reclaimed by the VM. This can only happen once the garbage collector has detected that the object is no longer reachable by any thread of the running application.

The method can be used to free system resources or perform other cleanup before the object is garbage collected. The default implementation of the method is empty, which is also expected by the VM, but subclasses can override finalize() as required. Uncaught exceptions which are thrown during the execution of this method cause it to terminate immediately but are otherwise ignored.

Note that the VM does guarantee that finalize() is called at most once for any object, but it doesn't guarantee when (if at all) finalize() will be called. For example, object B's finalize() can delay the execution of object A's finalize() method and therefore it can delay the reclamation of A's memory. To be safe, use a ReferenceQueue, because it provides more control over the way the VM deals with references during garbage collection.