Search code examples
androidsdkphone-callandroid-dialer

Android SDK Sending numbers to Running Phone call


I want to write an App which is able to Call a specified Number and after the Call is initiated, send some Numbers.

It is quite easy to call a Number, but it seems that there is no way to send numbers after like 6 seconds.

How can I achieve this? Please give suggestions.


Solution

  • After the number you send with your call intent, add three commas ",,," and the numbers you want to send afterwards. For example:

    Uri number = Uri.parse("tel:" + "554545454" + ",,," + "32");
    Intent dial = new Intent(Intent.ACTION_CALL, number);
    startActivity(dial);
    

    A comma "," means 2 sec pause. (https://stackoverflow.com/a/6882906/5250273)