Code examples for ToneGenerator

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
126:	toneGen1 = new ToneGenerator(AudioManager.STREAM_MUSIC, 100); 
-
129:	if (toneGen1.startTone(ToneGenerator.TONE_DTMF_1)) { 
130:	Thread.sleep(100); 
-
132:	Thread.sleep(500); 
133:	toneGen1.stopTone(); 
134:	Thread.sleep(100); 
-
137:	toneGen1.stopTone(); 
-
144:	toneGen1.release(); 
Full Snippet Info
8
CodeRank
126:	toneGen1 = new ToneGenerator(AudioManager.STREAM_MUSIC, 100); 
-
129:	if (toneGen1.startTone(ToneGenerator.TONE_DTMF_1)) { 
130:	Thread.sleep(100); 
-
132:	Thread.sleep(500); 
133:	toneGen1.stopTone(); 
134:	Thread.sleep(100); 
-
137:	toneGen1.stopTone(); 
-
144:	toneGen1.release(); 
Full Snippet Info
6
CodeRank
52:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
54:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
56:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
58:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
38:	generator.stopTone(); 
Full Snippet Info
5
CodeRank
58:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
60:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
52:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
54:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
56:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
58:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
58:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
60:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
113:	PBXOut.startTone(tone, PBXToneDuration); 
114:	Thread.sleep(PBXToneDuration); 
115:	PBXOut.stopTone();	//Probably not necessary 
116:	Thread.sleep(PBXWaitDuration); 
-
125:	PBXOut.startTone(tone, PBXToneDuration + PBXWaitDuration); 
126:	Thread.sleep(PBXToneDuration + PBXWaitDuration); 
127:	PBXOut.stopTone(); 
Full Snippet Info
5
CodeRank
52:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
54:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
58:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
60:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
52:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
54:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
52:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
54:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
56:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
58:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
56:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
58:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
58:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
60:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
58:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
60:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank