Sending DTMF tones over the uplink in-call

99封情书 提交于 2019-11-27 18:23:50

You've taken an interesting approach, and I commend your efforts. Unfortunately, there are some reserved internal privileges (evidently, such as SPN_STRINGS_UPDATED) that you aren't allowed to use as an app developer, which more or less breaks this approach. You could try removing the area of code causing this, but I'm fairly certain you will run into a blocking problem.

Hence, I'm afraid this is not possible at the moment. There's an open feature request on Android for sending DTMF tones over an existing phone call, but it has been dormant there for almost two years.

I understand that this doesn't resolve your problem, but take note that you can send DTMF tones directly after dialing a number:

Intent i = new Intent("android.intent.action.CALL",
                      Uri.parse("tel://" + number + "," + dtmfTones));

Simply put, you won't be able to do it without customizing at least the Phone app, which has to run as a system user in order to access the modem. In order to do this, you have to root your phone.

To meet your requirements the only possible solution is to enhance the android platform. We did just that, and already sent in our patches to the AOSP project:

https://android-review.googlesource.com/32820

https://android-review.googlesource.com/32821

We are currently waiting for the Google developers to review and accept our contribution. If you are interested, please let Google know on the various AOSP lists (android-contrib, android-platform). It will hopefully expedite the review.

Best Regards, Gergely

Asaf Pinhassi

You can't send DTMF tones during an active call, but you can send them when you "program" them when you initiate the call. see the following post: https://stackoverflow.com/a/12986066/475472

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!