Hi,
I have done the same and get success to replace the native incall screen with our custom screen having some rich information in it. This screen launches when call is inComming call and also at the time of outgoing call.
You can launch any activity by giving some delay at the time of call incoming notification found. It would replace the native screen by the custom one ..
BUT THE MAIN PROBLEM IS TO PIC THE IN CALL AND TO CANCEL THE OUT CALL BY CLICK ON BUTTON. How can I do that , I have used fallowing codes but none of them is working ... :
--------------------------------------
// Intent new_intent = new Intent(Intent.ACTION_MEDIA_BUTTON);
// new_intent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(
// KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_HEADSETHOOK));
// AfterScreen.this.getApplicationContext().sendOrderedBroadcast(
// new_intent, null);
----------------------------------
Intent new_intent = new Intent(Intent.ACTION_ANSWER);
// new_intent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(
// KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_HEADSETHOOK));
// AfterScreen.this.getApplicationContext().sendOrderedBroadcast(
// new_intent, null);
---------------------------------------------
// Intent intent = new Intent(Intent.ACTION_ANSWER);
// intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
// | Intent.FLAG_DEBUG_LOG_RESOLUTION
// | Intent.FLAG_FROM_BACKGROUND
// | Intent.FLAG_ACTIVITY_NEW_TASK);/**/
// intent.addCategory(Intent.CATEGORY_DEFAULT);
// intent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(
// KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_HEADSETHOOK));
// startActivity(intent);
------------------------------------------------------
// Intent intent = new Intent (Intent.ACTION_ANSWER);
// intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK);
// Receiver.mContext.startActivity (intent);
------------------------------------------------------------------
// Intent ic = new Intent(Intent.ACTION_ANSWER);
//
// ic.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
// | Intent.FLAG_DEBUG_LOG_RESOLUTION
// | Intent.FLAG_FROM_BACKGROUND
// | Intent.FLAG_ACTIVITY_NEW_TASK);
// Receiver.mContext.startActivity(ic);
------------------------------------------------------------------------
// Intent myIntent = new Intent(Intent.ACTION_ANSWER);
// myIntent.setFlags( //
// Intent.FLAG_ACTIVITY_SINGLE_TOP | //
// Intent.FLAG_DEBUG_LOG_RESOLUTION | //
// Intent.FLAG_ACTIVITY_CLEAR_TOP | //
// Intent.FLAG_ACTIVITY_NEW_TASK | // will crash
//
// Intent.FLAG_FROM_BACKGROUND //
// ).addCategory(Intent.CATEGORY_DEFAULT);
// Receiver.mContext.startActivity(myIntent);
--------------------------------------------------------------------------------
// Intent intent = new Intent(android.in.action.ANSWER);
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// startActivity(intent);
// Intent myIntent = new Intent(Intent.ACTION_ANSWER);
// myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
// | Intent.FLAG_DEBUG_LOG_RESOLUTION
// | Intent.FLAG_FROM_BACKGROUND
// | Intent.FLAG_ACTIVITY_NEW_TASK);
// startActivityForResult(myIntent, 0);
-------------------------------------------------------------------------
// Intent intent = new Intent("android.intent.action.ANSWER");
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// startActivity(intent);
// Receiver.mContext.startActivity(Receiver
// .createIntent(AutoAnswer.class));]
-------------------------------------------------------------