How to play DTMF tones in android via headphone programatically?
Asked Answered
S

1

6

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

Saul answered 30/12, 2013 at 7:13 Comment(1)
Dtmf tones are standardized. You can look up the frequencies for each tone and generate them manually.Ambry
S
6

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();
Saul answered 31/12, 2013 at 7:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.