4

I'm looking to build an android app that automatically accepts an incoming call, and once it does dial the #1 on that call.

So far, I am using the TelecomManager to accept the phone call which works great. Once the call has been answered however, it seems like I am unable to use the keypad programatically produring the call.

I have tried launching various intents with data but all of them seem to start a new call putting the current on hold or launching the dialer which doesn't work for the current call.

The latest intent I've tried is:

        Intent call = new Intent("android.intent.action.CALL", 
        Uri.parse("tel://2"));
        startActivity(call);

I've also tried the keypad launch but that is a different keypad than the one used in the call.

As stated, this just begins a new call. Pretty much imagine a lobby where you need to press 1 to continue, how would I go about doing that?

This is not the same as dialing a number and using the , symbol as a wait method, instead I accept the call and need to type the number 1 for the system.

Thanks so much!

Reid
  • 41
  • 4
  • Possible duplicate of [how to programmatically enter the number into phone application screen in android during conversation](https://stackoverflow.com/questions/26520263/how-to-programmatically-enter-the-number-into-phone-application-screen-in-androi) – Morrison Chang Apr 04 '19 at 03:25
  • @MorrisonChang Hi, this is not a duplicate considering I am not making an outgoing call with use of the , symbol for the wait. Instead, I am accepting a call and need to use the dialpad inside of that conversation. Thanks! – Reid Apr 04 '19 at 04:15
  • That's would be pretty serious issue if one could inject DTMF tones in ongoing conversation, so hopefuly you are out of luck. – Marcin Orlowski Apr 04 '19 at 04:21
  • 1
    See: [Is it possible to programmatically dial numbers during a phone call?](https://stackoverflow.com/q/12456472/295004) which leads to these issue tickets: https://issuetracker.google.com/issues/36988863 and https://issuetracker.google.com/issues/36906273 so the request for an API is outstanding (and unaddressed). – Morrison Chang Apr 04 '19 at 04:41
  • @MorrisonChang Thanks for the links, it appears it's not possible at this time. I appreciate the help. – Reid Apr 04 '19 at 05:19

0 Answers0