拒绝在android中调用

时间:2012-12-13 12:14:14

标签: android call telephonymanager

如何在拨打铃声5秒后自动拒绝来自Android应用的来电?

2 个答案:

答案 0 :(得分:2)

点击此链接: Android: Taking complete control of phone(kiosk mode), is it possible? How?

 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());
     }

答案 1 :(得分:0)

检查此链接: 您可以使用Android的Root Call Blocker快速拒绝来电! http://www.xda-developers.com/android/reject-calls-quickly-with-root-call-blocker-for-android/