I am trying to identify and transfer to an activity after an outgoing call is initiated. I used ACTION_NEW_OUTGOING_CALL
in the Intent filter. However how csn I identify that the call is outgoing. I did this for an incoming call (as seen below) but what can I use instead of EXTRA_STATE_RINGING
.
public class OutgoingBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
if (state.equals(TelephonyManager.EXTRA_STATE_RINGING))
{
Intent i = new Intent(context, OutgoingCallScreenDisplay.class);
i.putExtras(intent);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
}