Hide dtmf tone while dialing
Asked Answered
Y

1

9

I'm making a call app with call a number and send dtmf tone after that by

String number = "tel:+1234567,890#";
Intent c1 = new Intent(android.content.Intent.ACTION_CALL, Uri.parse(number));

Currently it can dial 1234567, wait about 3 sec, then dial 890. Functional okay but it send 890 with tone which kind of not very conformable, Is there any way to send 890 without tone response back?

Yalu answered 7/8, 2013 at 1:19 Comment(0)
M
1

There is no way for developers to do this via public APIs. Unfortunately, Android doesn't handle DTMF control very well. For example, there's a two year old feature request to allow a user to send DTMF controls at an arbitrary time during a call; it's been abandoned.

As you know, using ACTION_CALL or ACTION_DIAL and doing <number>|,;|<tones> will send DTMF tones directly after a call is connected, but that's where user control over the issue stops.

Any additional controls, such as sending additional tones or muting the tone response to the handset, are handled by internal APIs, notable com.android.internal.telephony. Of note is the stopDtmf() method, which would possibly do what you're looking for, except that it's internal and may not have consistent behavior.

Here's what the 2.x source looked like for the method. As stated, there's no guarantee this would work and using internal APIs is strongly discouraged.

Malocclusion answered 10/10, 2013 at 21:44 Comment(8)
I have seen the applications hiding the DTMF tones .Nubianubian
Example? I haven't seen one that didn't require root.Malocclusion
The issue is much older than two years; it's approaching its fifth anniversary, and these patches were submitted and abandoned 18 months ago. I have little hope anything will change on the short term, and bear in mind that even if they do, it won't be compatible with previous versions of Android.Chinatown
@PaulLammertsma Agreed. Note that I said the feature request linked was 2 years old, not that the issue was 2 years old. It's just shy of 5, as you mentioned.Malocclusion
com.android.internal.telephony could be accessed using reflection pre Android 3.1, in later versions I believe Google's blocked access to this stuff; making it available for manufacturers onlyTurbulence
play.google.com/store/apps/…Nubianubian
this application can hide the DTMF tone ..how is it possible?Nubianubian
@Nubianubian I tried out the application that you've linked & it didn't hide the DTMF tones.Idolatrous

© 2022 - 2024 — McMap. All rights reserved.