1

OutGoingCallEnding

This is my link source code, I want to ending the out going call ending particular time.after some limit time another out going call going.

Community
  • 1
  • 1
Satya
  • 340
  • 7
  • 17
  • http://stackoverflow.com/questions/599443/android-how-to-hang-up-outgoing-call/5314372#5314372 – Calvin Mar 16 '12 at 07:26

2 Answers2

1

for ending an call in android add ITelephony.aidl in your project and call endCall() method like this :

private void endCall() {
  //iTelephony
  Class<TelephonyManager> c = TelephonyManager.class;
  Method getITelephonyMethod = null;
  try {
   getITelephonyMethod = c.getDeclaredMethod("getITelephony",(Class[]) null);
   getITelephonyMethod.setAccessible(true);
   ITelephony iTelephony = (ITelephony) getITelephonyMethod.invoke(mTelephonyManager, (Object[]) null);
   iTelephony.endCall();
   Log.v(this.getClass().getName(), "endCall......");
  } catch (Exception e) {
   Log.e(this.getClass().getName(), "endCallError", e);
  } 
 }
ρяσѕρєя K
  • 132,198
  • 53
  • 198
  • 213
-1
package com.android.internal.telephony;

 interface ITelephony {


  boolean endCall();


   void answerRingingCall();


   void silenceRinger();

}

creating one packing save it this

Satya
  • 340
  • 7
  • 17