Android: Dialing A Custom Number Once Call Picked Up
Solution 1:
I don't think there is an API for that
The best way I'm thinking right now is to open an app during the call (maybe through Receiver) with a TextView where you can enter your text
Then here you can make your call :
IntentintentCall=newIntent(Intent.ACTION_CALL, Uri.fromParts("tel", phoneNumber, null));
startActivity(intentCall);
But I don't know how the phone app will react
Solution 2:
From the description you have given, it appears that you would require to use the telephony manager interface. The problem you might face going forward with this idea for you would be that you would be trying to pick the call programatically and effectively change the phone state. In other words you would require the MODIFY_PHONE_STATE permission. This permission has now been restricted to System apps only, starting from Gingerbread. Without this basic permission, I think your application idea would not be very much fiesible. Further, since you would be trying to key in numbers programatically, which i am assuming is for the purpose of sending DTMF tones, you would have the problem that in Android In Call Data is not accessible to applications. As of now the support for a proper telephony package in Android is missing. I hope the above clarifies some of your questions.
Solution 3:
If I understand you correctly, you want the app to punch in a few numbers in the dial pad after a call is received.
The following may be an option worth trying.
Obtain the internal com.android.internal.telephony.ITelephony
object using Java reflection
. Details here. Then call the dial()
method. This method just adds the numbers to the dial pad but doesn't actually initiate a phone call. This might work for you.
Post a Comment for "Android: Dialing A Custom Number Once Call Picked Up"