1

I'm wondering how to end incoming/outgoing call programatically in android. I tried the solution posted here but I got no luck in getting it work.

I am using following code to disconnect call using the BroadCast...

try{
       TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
       Class c = Class.forName(manager.getClass().getName());
       Method m = c.getDeclaredMethod("getITelephony");
       m.setAccessible(true);
       ITelephony telephony = (ITelephony)m.invoke(manager);
       telephony.endCall();
  } catch(Exception e){
       Log.d("",e.getMessage());
  }

but I got error:

NO such method name 'getITelephony' in ICS call is not disconnecting
Community
  • 1
  • 1
Hazem Hagrass
  • 9,329
  • 10
  • 32
  • 54

1 Answers1

1

I think that this way is not available any more in android 2.3+, this article is discussing this issue