Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- toneGen1 = new ToneGenerator(AudioManager.STREAM_MUSIC, 100);
- toneGen2 = new ToneGenerator(AudioManager.STREAM_MUSIC, 50);
- if (toneGen1.startTone(ToneGenerator.TONE_DTMF_1)) {
- Thread.sleep(100);
- if (toneGen2.startTone(ToneGenerator.TONE_DTMF_2)) {
- Thread.sleep(500);
- toneGen1.stopTone();
- Thread.sleep(100);
- toneGen2.stopTone();
- } else {
- toneGen1.stopTone();
- result = false;
- }
- } else {
- result = false;
- }
- toneGen1.release();
- toneGen2.release();
- return result;
- }
Add Comment
Please, Sign In to add comment