• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pic and cancel the in call programmetically on Android Version 5 (2.2) os .. replacement of-

 
Abhit Nigam
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was trying to replace native incall screen with custom incall screen,and for the same I got success .
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));]


-------------------------------------------------------------


Thanks In Advance ...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic