2

I am using the following code for dialing programmatically under Android.

try {
    Intent callIntent = new Intent(Intent.ACTION_CALL);
    callIntent.setData(Uri.parse("tel:123456789"));
    startActivity(callIntent);
} catch (Exception exception) {
    log.e("dialing-example", "Call failed", Exception);
}

But how can I terminate the call programmatically?

MByD
  • 135,866
  • 28
  • 264
  • 277
Mahadeva Prasad
  • 709
  • 8
  • 19
  • 1
    Have you considered using the solution provided here : http://stackoverflow.com/questions/599443/android-how-to-hang-up-outgoing-call – Sephy Mar 12 '12 at 10:26
  • try this:[Call Control in Android](http://prasanta-paul.blogspot.in/2010/09/call-control-in-android.html) – ρяσѕρєя K Mar 12 '12 at 10:31

1 Answers1

1

we canot use java reflection for ending a call programatically.android.

Google now change the permission of to the system application only.

So the endcall method in ITelephony.AIDL interface is no longer work for android 2.3+ version

anshad
  • 824
  • 8
  • 19