Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to play DTMF tones in android via headphone programatically?

I am currently working on a car security system....

I need to produce DTMF tones via the headphones of the phone that makes an input to the external digital circuit. Is there any API to do this? Canany one helpm....

Thanks in advance...

like image 406
Jithin Kuriakose Avatar asked Dec 30 '13 07:12

Jithin Kuriakose


People also ask

What is DTMF mode on Android phone?

Dual tone multi-frequency (DTMF) is the sounds or tones generated by a telephone when the numbers are pressed. These tones are transmitted with the voice channel. DTMF is used to control automated equipment and signal user intent, such as the number they wish to dial.


Video Answer


1 Answers

I got the Answer....Its very simple....

http://developer.android.com/reference/android/media/ToneGenerator.html

ToneGenerator dtmfGenerator = new ToneGenerator(0,ToneGenerator.MAX_VOLUME);
dtmfGenerator.startTone(ToneGenerator.TONE_DTMF_0, 1000); // all types of tones are available...
dtmfGenerator.stopTone();
like image 112
Jithin Kuriakose Avatar answered Oct 13 '22 00:10

Jithin Kuriakose