Android: dialing a user number after calling a call

I am working on an application that picks up a call, and on the dial pad during an active call, it enters a previously saved or copied number. First, I would like to know if this is possible. Secondly, I was thinking about some ideas, but I have no idea how wild they are, since I'm relatively new to Android and have little in mind its limitations:

  • Save the number to the clipboard and try pasting a click on the call screen, which simply pastes the number into the number.
  • Take each digit in the quantity stored on the clipboard and programmatically press the keys on the telephone keypad that the user otherwise touched.
  • Open the incoming call in my own application, which can answer the call and has the ability to insert / add numbers to the dialer
  • Override one of the keys on the keyboard that appears in the call (for example, the return key), and reprogram it to perform the function that I want (so instead of going back, it will enter the saved number)

Are there any of them (why or why not)? Or can you suggest any other way to accomplish what I want? Thank you, very grateful.

Edit: Let me be more specific. This is the screen I'm aiming for:

enter image description here- . , , , . , , , , , . , , .

+2
3

, API.

, , - ( , Receiver) TextView,

:

Intent intentCall = new Intent(Intent.ACTION_CALL, Uri.fromParts("tel", phoneNumber, null));
startActivity(intentCall);

,

+3

, , , . , , , . , MODIFY_PHONE_STATE. , Gingerbread. , . , , DTMF, , Android In Call Data . Android. , .

+2

, , .

, .

com.android.internal.telephony.ITelephony, Java reflection. . dial(). , . .

+2

All Articles