Added in API level 1

ToneGenerator


open class ToneGenerator
kotlin.Any
   ↳ android.media.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.

Summary

Constants
static Int

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

static Int

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

static Int

CDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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.

static Int

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

static Int

ISDN Call sign PAT3 tone: silent tone

static Int

ISDN Pat5 tone: silent tone

static Int

ISDN Pat6 tone: silent tone

static Int

ISDN Pat7 tone: silent tone

static Int

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

static Int

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

static Int

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

static Int

CDMA Dial tone : 425Hz continuous

static Int

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

static Int

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

static Int

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

static Int

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.

static Int

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

static Int

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.

static Int

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.

static Int

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

static Int

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

static Int

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 .

static Int

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

static Int

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.

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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.

static Int

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

static Int

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.

static Int

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.

static Int

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

static Int

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

static Int

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 .

static Int

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

static Int

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.

static Int

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

static Int

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

static Int

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.

static Int

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

static Int

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.

static Int

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.

static Int

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

static Int

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

static Int

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 .

static Int

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

static Int

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.

static Int

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

static Int

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

static Int

CDMA Network Callwaiting tone: 440Hz 300ms ON

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

CDMA_SIGNAL_OFF - silent tone

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

Call supervisory tone, Busy: CEPT: 425Hz, 500ms ON, 500ms OFF.

static Int

Call supervisory tone, Call Waiting: CEPT, JAPAN: 425Hz, 200ms ON, 600ms OFF, 200ms ON, 3s OFF.

static Int

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

static Int

Call supervisory tone, Congestion: CEPT, JAPAN: 425Hz, 200ms ON, 200ms OFF.

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

Call supervisory tone, Ring Tone: CEPT, JAPAN: 425Hz, 1s ON, 4s OFF.

Public constructors
ToneGenerator(streamType: Int, volume: Int)

ToneGenerator class contructor specifying output stream type and volume.

Public methods
Int

Returns the audio session ID.

open Unit

Releases resources associated with this ToneGenerator object.

open Boolean
startTone(toneType: Int)

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

open Boolean
startTone(toneType: Int, durationMs: Int)

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

open Unit

This method stops the tone currently playing playback.

Protected methods
open Unit

Constants

MAX_VOLUME

Added in API level 1
static val MAX_VOLUME: Int

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

Value: 100

MIN_VOLUME

Added in API level 1
static val MIN_VOLUME: Int

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

Value: 0

TONE_CDMA_ABBR_ALERT

Added in API level 4
static val TONE_CDMA_ABBR_ALERT: Int

CDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON

Value: 97

TONE_CDMA_ABBR_INTERCEPT

Added in API level 4
static val TONE_CDMA_ABBR_INTERCEPT: Int

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

Value: 37

TONE_CDMA_ABBR_REORDER

Added in API level 4
static val TONE_CDMA_ABBR_REORDER: Int

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

Value: 39

TONE_CDMA_ALERT_AUTOREDIAL_LITE

Added in API level 4
static val TONE_CDMA_ALERT_AUTOREDIAL_LITE: Int

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

Value: 87

TONE_CDMA_ALERT_CALL_GUARD

Added in API level 4
static val TONE_CDMA_ALERT_CALL_GUARD: Int

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

Value: 93

TONE_CDMA_ALERT_INCALL_LITE

Added in API level 4
static val TONE_CDMA_ALERT_INCALL_LITE: Int

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

Value: 91

TONE_CDMA_ALERT_NETWORK_LITE

Added in API level 4
static val TONE_CDMA_ALERT_NETWORK_LITE: Int

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

Value: 86

TONE_CDMA_ANSWER

Added in API level 4
static val TONE_CDMA_ANSWER: Int

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

Value: 42

TONE_CDMA_CALLDROP_LITE

Added in API level 4
static val TONE_CDMA_CALLDROP_LITE: Int

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

Value: 95

TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP

Added in API level 4
static val TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP: Int

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.

Value: 46

TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL

Added in API level 4
static val TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL: Int

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

Value: 45

TONE_CDMA_CALL_SIGNAL_ISDN_PAT3

Added in API level 4
static val TONE_CDMA_CALL_SIGNAL_ISDN_PAT3: Int

ISDN Call sign PAT3 tone: silent tone

Value: 48

TONE_CDMA_CALL_SIGNAL_ISDN_PAT5

Added in API level 4
static val TONE_CDMA_CALL_SIGNAL_ISDN_PAT5: Int

ISDN Pat5 tone: silent tone

Value: 50

TONE_CDMA_CALL_SIGNAL_ISDN_PAT6

Added in API level 4
static val TONE_CDMA_CALL_SIGNAL_ISDN_PAT6: Int

ISDN Pat6 tone: silent tone

Value: 51

TONE_CDMA_CALL_SIGNAL_ISDN_PAT7

Added in API level 4
static val TONE_CDMA_CALL_SIGNAL_ISDN_PAT7: Int

ISDN Pat7 tone: silent tone

Value: 52

TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING

Added in API level 4
static val TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING: Int

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

Value: 49

TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI

Added in API level 4
static val TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI: Int

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

Value: 47

TONE_CDMA_CONFIRM

Added in API level 4
static val TONE_CDMA_CONFIRM: Int

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

Value: 41

TONE_CDMA_DIAL_TONE_LITE

Added in API level 4
static val TONE_CDMA_DIAL_TONE_LITE: Int

CDMA Dial tone : 425Hz continuous

Value: 34

TONE_CDMA_EMERGENCY_RINGBACK

Added in API level 4
static val TONE_CDMA_EMERGENCY_RINGBACK: Int

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

Value: 92

TONE_CDMA_HIGH_L

Added in API level 4
static val TONE_CDMA_HIGH_L: Int

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

Value: 53

TONE_CDMA_HIGH_PBX_L

Added in API level 4
static val TONE_CDMA_HIGH_PBX_L: Int

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

Value: 71

TONE_CDMA_HIGH_PBX_SLS

Added in API level 4
static val TONE_CDMA_HIGH_PBX_SLS: Int

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

Value: 80

TONE_CDMA_HIGH_PBX_SS

Added in API level 4
static val TONE_CDMA_HIGH_PBX_SS: Int

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

Value: 74

TONE_CDMA_HIGH_PBX_SSL

Added in API level 4
static val TONE_CDMA_HIGH_PBX_SSL: Int

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

Value: 77

TONE_CDMA_HIGH_PBX_S_X4

Added in API level 4
static val TONE_CDMA_HIGH_PBX_S_X4: Int

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

Value: 83

TONE_CDMA_HIGH_SLS

Added in API level 4
static val TONE_CDMA_HIGH_SLS: Int

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

Value: 65

TONE_CDMA_HIGH_SS

Added in API level 4
static val TONE_CDMA_HIGH_SS: Int

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

Value: 56

TONE_CDMA_HIGH_SSL

Added in API level 4
static val TONE_CDMA_HIGH_SSL: Int

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

Value: 59

TONE_CDMA_HIGH_SS_2

Added in API level 4
static val TONE_CDMA_HIGH_SS_2: Int

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

Value: 62

TONE_CDMA_HIGH_S_X4

Added in API level 4
static val TONE_CDMA_HIGH_S_X4: Int

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

Value: 68

TONE_CDMA_INTERCEPT

Added in API level 4
static val TONE_CDMA_INTERCEPT: Int

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

Value: 36

TONE_CDMA_KEYPAD_VOLUME_KEY_LITE

Added in API level 4
static val TONE_CDMA_KEYPAD_VOLUME_KEY_LITE: Int

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

Value: 89

TONE_CDMA_LOW_L

Added in API level 4
static val TONE_CDMA_LOW_L: Int

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

Value: 55

TONE_CDMA_LOW_PBX_L

Added in API level 4
static val TONE_CDMA_LOW_PBX_L: Int

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

Value: 73

TONE_CDMA_LOW_PBX_SLS

Added in API level 4
static val TONE_CDMA_LOW_PBX_SLS: Int

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

Value: 82

TONE_CDMA_LOW_PBX_SS

Added in API level 4
static val TONE_CDMA_LOW_PBX_SS: Int

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

Value: 76

TONE_CDMA_LOW_PBX_SSL

Added in API level 4
static val TONE_CDMA_LOW_PBX_SSL: Int

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

Value: 79

TONE_CDMA_LOW_PBX_S_X4

Added in API level 4
static val TONE_CDMA_LOW_PBX_S_X4: Int

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

Value: 85

TONE_CDMA_LOW_SLS

Added in API level 4
static val TONE_CDMA_LOW_SLS: Int

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

Value: 67

TONE_CDMA_LOW_SS

Added in API level 4
static val TONE_CDMA_LOW_SS: Int

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

Value: 58

TONE_CDMA_LOW_SSL

Added in API level 4
static val TONE_CDMA_LOW_SSL: Int

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

Value: 61

TONE_CDMA_LOW_SS_2

Added in API level 4
static val TONE_CDMA_LOW_SS_2: Int

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

Value: 64

TONE_CDMA_LOW_S_X4

Added in API level 4
static val TONE_CDMA_LOW_S_X4: Int

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

Value: 70

TONE_CDMA_MED_L

Added in API level 4
static val TONE_CDMA_MED_L: Int

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

Value: 54

TONE_CDMA_MED_PBX_L

Added in API level 4
static val TONE_CDMA_MED_PBX_L: Int

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

Value: 72

TONE_CDMA_MED_PBX_SLS

Added in API level 4
static val TONE_CDMA_MED_PBX_SLS: Int

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

Value: 81

TONE_CDMA_MED_PBX_SS

Added in API level 4
static val TONE_CDMA_MED_PBX_SS: Int

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

Value: 75

TONE_CDMA_MED_PBX_SSL

Added in API level 4
static val TONE_CDMA_MED_PBX_SSL: Int

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

Value: 78

TONE_CDMA_MED_PBX_S_X4

Added in API level 4
static val TONE_CDMA_MED_PBX_S_X4: Int

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

Value: 84

TONE_CDMA_MED_SLS

Added in API level 4
static val TONE_CDMA_MED_SLS: Int

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

Value: 66

TONE_CDMA_MED_SS

Added in API level 4
static val TONE_CDMA_MED_SS: Int

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

Value: 57

TONE_CDMA_MED_SSL

Added in API level 4
static val TONE_CDMA_MED_SSL: Int

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

Value: 60

TONE_CDMA_MED_SS_2

Added in API level 4
static val TONE_CDMA_MED_SS_2: Int

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

Value: 63

TONE_CDMA_MED_S_X4

Added in API level 4
static val TONE_CDMA_MED_S_X4: Int

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

Value: 69

TONE_CDMA_NETWORK_BUSY

Added in API level 4
static val TONE_CDMA_NETWORK_BUSY: Int

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

Value: 40

TONE_CDMA_NETWORK_BUSY_ONE_SHOT

Added in API level 4
static val TONE_CDMA_NETWORK_BUSY_ONE_SHOT: Int

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

Value: 96

TONE_CDMA_NETWORK_CALLWAITING

Added in API level 4
static val TONE_CDMA_NETWORK_CALLWAITING: Int

CDMA Network Callwaiting tone: 440Hz 300ms ON

Value: 43

TONE_CDMA_NETWORK_USA_RINGBACK

Added in API level 4
static val TONE_CDMA_NETWORK_USA_RINGBACK: Int

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

Value: 35

TONE_CDMA_ONE_MIN_BEEP

Added in API level 4
static val TONE_CDMA_ONE_MIN_BEEP: Int

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

Value: 88

TONE_CDMA_PIP

Added in API level 4
static val TONE_CDMA_PIP: Int

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

Value: 44

TONE_CDMA_PRESSHOLDKEY_LITE

Added in API level 4
static val TONE_CDMA_PRESSHOLDKEY_LITE: Int

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

Value: 90

TONE_CDMA_REORDER

Added in API level 4
static val TONE_CDMA_REORDER: Int

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

Value: 38

TONE_CDMA_SIGNAL_OFF

Added in API level 4
static val TONE_CDMA_SIGNAL_OFF: Int

CDMA_SIGNAL_OFF - silent tone

Value: 98

TONE_CDMA_SOFT_ERROR_LITE

Added in API level 4
static val TONE_CDMA_SOFT_ERROR_LITE: Int

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

Value: 94

TONE_DTMF_0

Added in API level 1
static val TONE_DTMF_0: Int

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

Value: 0

TONE_DTMF_1

Added in API level 1
static val TONE_DTMF_1: Int

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

Value: 1

TONE_DTMF_2

Added in API level 1
static val TONE_DTMF_2: Int

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

Value: 2

TONE_DTMF_3

Added in API level 1
static val TONE_DTMF_3: Int

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

Value: 3

TONE_DTMF_4

Added in API level 1
static val TONE_DTMF_4: Int

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

Value: 4

TONE_DTMF_5

Added in API level 1
static val TONE_DTMF_5: Int

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

Value: 5

TONE_DTMF_6

Added in API level 1
static val TONE_DTMF_6: Int

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

Value: 6

TONE_DTMF_7

Added in API level 1
static val TONE_DTMF_7: Int

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

Value: 7

TONE_DTMF_8

Added in API level 1
static val TONE_DTMF_8: Int

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

Value: 8

TONE_DTMF_9

Added in API level 1
static val TONE_DTMF_9: Int

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

Value: 9

TONE_DTMF_A

Added in API level 1
static val TONE_DTMF_A: Int

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

Value: 12

TONE_DTMF_B

Added in API level 1
static val TONE_DTMF_B: Int

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

Value: 13

TONE_DTMF_C

Added in API level 1
static val TONE_DTMF_C: Int

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

Value: 14

TONE_DTMF_D

Added in API level 1
static val TONE_DTMF_D: Int

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

Value: 15

TONE_DTMF_P

Added in API level 1
static val TONE_DTMF_P: Int

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

Value: 11

TONE_DTMF_S

Added in API level 1
static val TONE_DTMF_S: Int

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

Value: 10

TONE_PROP_ACK

Added in API level 1
static val TONE_PROP_ACK: Int

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

Value: 25

TONE_PROP_BEEP

Added in API level 1
static val TONE_PROP_BEEP: Int

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

Value: 24

TONE_PROP_BEEP2

Added in API level 1
static val TONE_PROP_BEEP2: Int

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

Value: 28

TONE_PROP_NACK

Added in API level 1
static val TONE_PROP_NACK: Int

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

Value: 26

TONE_PROP_PROMPT

Added in API level 1
static val TONE_PROP_PROMPT: Int

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

Value: 27

TONE_SUP_BUSY

Added in API level 1
static val TONE_SUP_BUSY: Int

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

Value: 17

TONE_SUP_CALL_WAITING

Added in API level 1
static val TONE_SUP_CALL_WAITING: Int

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

Value: 22

TONE_SUP_CONFIRM

Added in API level 4
static val TONE_SUP_CONFIRM: Int

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

Value: 32

TONE_SUP_CONGESTION

Added in API level 1
static val TONE_SUP_CONGESTION: Int

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

Value: 18

TONE_SUP_CONGESTION_ABBREV

Added in API level 4
static val TONE_SUP_CONGESTION_ABBREV: Int

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

Value: 31

TONE_SUP_DIAL

Added in API level 1
static val TONE_SUP_DIAL: Int

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

Value: 16

TONE_SUP_ERROR

Added in API level 1
static val TONE_SUP_ERROR: Int

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

Value: 21

TONE_SUP_INTERCEPT

Added in API level 4
static val TONE_SUP_INTERCEPT: Int

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

Value: 29

TONE_SUP_INTERCEPT_ABBREV

Added in API level 4
static val TONE_SUP_INTERCEPT_ABBREV: Int

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

Value: 30

TONE_SUP_PIP

Added in API level 4
static val TONE_SUP_PIP: Int

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

Value: 33

TONE_SUP_RADIO_ACK

Added in API level 1
static val TONE_SUP_RADIO_ACK: Int

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

Value: 19

TONE_SUP_RADIO_NOTAVAIL

Added in API level 1
static val TONE_SUP_RADIO_NOTAVAIL: Int

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

Value: 20

TONE_SUP_RINGTONE

Added in API level 1
static val TONE_SUP_RINGTONE: Int

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

Value: 23

Public constructors

ToneGenerator

Added in API level 1
ToneGenerator(
    streamType: Int,
    volume: Int)

ToneGenerator class contructor specifying output stream type and volume.

Parameters
streamType Int: The streame type used for tone playback (e.g. STREAM_MUSIC).
volume Int: The volume of the tone, given in percentage of maximum volume (from 0-100).

Public methods

getAudioSessionId

Added in API level 16
fun getAudioSessionId(): Int

Returns the audio session ID.

Return
Int the ID of the audio session this ToneGenerator belongs to or 0 if an error occured.

release

Added in API level 1
open fun release(): Unit

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

startTone

Added in API level 1
open fun startTone(toneType: Int): Boolean

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 Int: The type of tone generated chosen from the following list:

startTone

Added in API level 5
open fun startTone(
    toneType: Int,
    durationMs: Int
): Boolean

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

Parameters
toneType Int: The type of tone generated @see startTone(int).
durationMs Int: 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).

stopTone

Added in API level 1
open fun stopTone(): Unit

This method stops the tone currently playing playback.

Protected methods

finalize

Added in API level 1
protected open fun finalize(): Unit
Exceptions
java.lang.Throwable the Exception raised by this method