Best code examples for Android ToneGenerator class (android.media.ToneGenerator)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ToneGenerator class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android ToneGenerator examples from Open Source projects
This code example shows how to use the following methods: release, startTone, stopTone, sleep
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: release, startTone, stopTone, sleep
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: stopTone
38:	generator.stopTone(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone, stopTone, sleep
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
57:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 
-
60:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: startTone
55:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, (int)(ToneGenerator.MAX_VOLUME * 0.85)); 
-
57:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: startTone
51:	ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 
-
54:	tg.startTone(ToneGenerator.TONE_PROP_BEEP); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: startTone
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
This code example shows how to use the following methods: release, startTone
35:	ToneGenerator tg = new ToneGenerator( 
-
37:	tg.startTone(ToneGenerator.TONE_DTMF_2, 100); 
38:	tg.release(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: release, startTone
125:	ToneGenerator tg = new ToneGenerator( 
-
127:	tg.startTone(ToneGenerator.TONE_DTMF_P, 100); 
128:	tg.release(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: stopTone
62:	mToneGenerator.stopTone(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: startTone
325:	toneGenerator.startTone(16, 50); 
-
328:	toneGenerator.startTone(16, 200); 
-
331:	toneGenerator.startTone(16); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: stopTone
62:	mToneGenerator.stopTone(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: stopTone
118:	beepTone.stopTone(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: stopTone
97:	mToneGenerator.stopTone(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: release
102:	mToneGenerator.release(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: release
67:	generator.release(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: stopTone
58:	generator.stopTone(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: release, stopTone
248:	tg.stopTone(); 
249:	tg.release(); 
Full Snippet Info
4
CodeRank
Related Android ToneGenerator Questions & Answers:
See Code Examples for Android ToneGenerator Methods: