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(); } } 获得窗口宽高问题 Button ImageView ImageButton有关问题 android 在线网络电台收听 Andriod收集的开发资料大放送 Fedora 12 开机后只显示蓝色背景 无图标 android设置里有个凭据储存是干什么用的?谁能解释下... 为什么ImageButton显示出来的尺寸比资源图片的尺寸小?求指点,感谢 在TimerTask中还需要new Thread么? 为什么不同手机radiobutton显示不同 Activity类如何给普通类发消息 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();
}
}