We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
畅想9/DUB_AL00 64G Android:8.1.0 开启自动接听后 java.lang.SecurityException: Neither user 10121 nor current process has android.permission.ANSWER_PHONE_CALLS.
java.lang.reflect.InvocationTargetException
The text was updated successfully, but these errors were encountered:
我已解决了,需要动态申请权限,运行之后,自己打个电话过去,权限弹出,点“始终允许”,后面的电话就可以自动接听了,配上自动录音效果更佳。
private final int ANSWER_PHONE_CALLS_STATE=1;
int permissionCheck = ContextCompat.checkSelfPermission(this, "android.permission.ANSWER_PHONE_CALLS");
if (permissionCheck != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{"android.permission.ANSWER_PHONE_CALLS"}, ANSWER_PHONE_CALLS_STATE); } else { Log.e("TTTTTTTTT","mMainHandler"); mMainHandler.postDelayed(mRunnable, 1000); }
Sorry, something went wrong.
No branches or pull requests
畅想9/DUB_AL00 64G
Android:8.1.0
开启自动接听后
java.lang.SecurityException: Neither user 10121 nor current process has android.permission.ANSWER_PHONE_CALLS.
java.lang.reflect.InvocationTargetException
The text was updated successfully, but these errors were encountered: