I am trying to launch my custom screen on top of native outgoing caller screen that may contain full Screen image of Caller and some buttons for actions like reject call. Using this I am able to make call, but is redirecting me to native caller screen...
How to replace\override
the default call screen by my custom screen screen?
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phonenumber)));
public class GetOutgoingNUmber extends BroadcastReceiver {
final static String INTENT_PHONE_NUMBER = "android.intent.extra.PHONE_NUMBER";
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
Log.v("DileBroadCastReceiver","In onReceive()");
if (intent.getAction().equals(Intent.ACTION_NEW_OUTGOING_CALL)) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent i = new Intent(context, OutGoingScreen.class);
i.putExtras(intent);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
context.startActivity(i);
}
}, 1000);
}
here OutGoingScreen is for displaying outgoing screen
public class OutGoingScreen extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.outgoingscreen );
}
}
Now the problem is it is showing my screen for few msec and again showing native screen....?