Neither user 10106 nor current process 异常要怎么处理 12-04 09:23:04.524: W/System.err(7535): java.lang.SecurityException: Neither user 10106 nor current process has android.permission.MODIFY_PHONE_STATE. 请高手指点谢谢. 最好有demo ! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 app没有权限android.permission.MODIFY_PHONE_STATE. private void answerCall() { TelephonyManager telMag = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); Class<TelephonyManager> c = TelephonyManager.class; Method mthCall = null; try { mthCall = c.getDeclaredMethod("getITelephony", (Class[]) null); mthEndCall.setAccessible(true); ITelephony iTel = (ITelephony) mthCall.invoke(telMag, (Object[]) null); iTel.answerRingingCall(); this.finish(); } catch (Exception e) { System.out.println(e.toString()); e.printStackTrace(); e.printStackTrace(); } } private void answerCall() { TelephonyManager telMag = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); Class<TelephonyManager> c = TelephonyManager.class; Method mthCall = null; try { mthCall = c.getDeclaredMethod("getITelephony", (Class[]) null); mthCall.setAccessible(true); ITelephony iTel = (ITelephony) mthCall.invoke(telMag, (Object[]) null); iTel.answerRingingCall(); this.finish(); } catch (Exception e) { System.out.println(e.toString()); e.printStackTrace(); e.printStackTrace(); } } Activity传值问题,新手求教 ScrollView添加自定义view显示不完全???????????????? 【求助】突发奇想,自制基于android系统的终端 关于log输出的问题 android地图应用如何获取周边商家信息? 如何解决android工程中.cpp下wchar_t占用四个字节的问题 是alertdialog还是popwindow啊? 在浏览文件夹时,在ListView的Item中定义Checkbox与Item之间的冲突 安卓开发界面设计 请问关于如何设置根据屏幕大小设置布局高度的问题 cygwin android 获取声音
TelephonyManager telMag = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
Class<TelephonyManager> c = TelephonyManager.class;
Method mthCall = null;
try {
mthCall = c.getDeclaredMethod("getITelephony", (Class[]) null);
mthEndCall.setAccessible(true);
ITelephony iTel = (ITelephony) mthCall.invoke(telMag,
(Object[]) null);
iTel.answerRingingCall();
this.finish();
} catch (Exception e) {
System.out.println(e.toString());
e.printStackTrace();
e.printStackTrace();
}
}
TelephonyManager telMag = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
Class<TelephonyManager> c = TelephonyManager.class;
Method mthCall = null;
try {
mthCall = c.getDeclaredMethod("getITelephony", (Class[]) null);
mthCall.setAccessible(true);
ITelephony iTel = (ITelephony) mthCall.invoke(telMag,
(Object[]) null);
iTel.answerRingingCall();
this.finish();
} catch (Exception e) {
System.out.println(e.toString());
e.printStackTrace();
e.printStackTrace();
}
}