I want to replace the outgoing screen and make call through that custom screen. I succeed to bring custom screen but I could not make calls. If I use ACTION.CALL then it call the Default outgoing screen.
public class OutgoingCallBroadcastReciver extends BroadcastReceiver {
Context c;
public OutgoingCallBroadcastReciver() {
}
@Override
public void onReceive(final Context context, final Intent intent) {
final String number = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
c=context;
setResultData(null);
setResultData(number);
callActionHandler.postDelayed(runRingingActivity, 1000);
}
Handler callActionHandler = new Handler();
Runnable runRingingActivity = new Runnable(){
@Override
public void run()
{
Intent intentPhoneCall = new Intent(c, OutgoingScreen.class);
intentPhoneCall.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intentPhoneCall.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
c.startActivity(intentPhoneCall);
}
};
}