Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if an outgoing call has been answered

Once ACTION_NEW_OUTGOING_CALL has been broadcasted, I need to capture the following event of the other party answer. Could you advice on how to achieve that please? I know it is possible as the Android dialer app changes the green Android icon to the person's photo exactly when they pick up.

UPDATED: I've had a look at the source of the app on Android handling the outgoing calls. I noticed the following method in ContactsUtils:

/**  * Kick off an intent to initiate a call.  */   public static void initiateCall(Context context, CharSequence  phoneNumber) {      Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,              Uri.fromParts("tel", phoneNumber.toString(), null));      context.startActivity(intent); } 

I guess my answer is in the activity listening for Intent.ACTION_CALL_PRIVILEGED. So to rephrase my question: Does anyone know which activity handles Intent.ACTION_CALL_PRIVILEGED?

like image 894
mobilekid Avatar asked Feb 12 '10 08:02

mobilekid


1 Answers

I don't think there's such API and also there's no API for sending DTMFs due to the same reason that you can't tell when the call is being connected.

like image 91
rbd Avatar answered Sep 24 '22 00:09

rbd