结束传出呼叫 [英] Ending the Out going call
本文介绍了结束传出呼叫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<一个href=\"http://stackoverflow.com/questions/9714989/i-am-not-getting-the-outgoing-call-phone-number-both-in-emulator-and-real-phone\">OutGoingCallEnding
这是我的链接源$ C $ C,我想结束了正在进行的呼叫结束特别time.after一些限制时间又走出去电话去。
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.
推荐答案
截至android系统中添加 ITelephony.aidl
在您的项目和呼叫结束()
的方法是这样的:
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);
}
}
这篇关于结束传出呼叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文