• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ...

 
Normally trees don't drive trucks. Does this tiny ad have a license?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic