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
我想在点击"我要拍照"的按钮时跳出Dialog 但是会直接闪退 请问有什么解决方法吗? 以下为"我要拍照"按钮的listener if (ActivityCompat.checkSelfPermission(activity, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { //未授权,提起权限申请 ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.CAMERA}, AppConstant.PERMISSION.CAMERA); } else { AlertDialog.Builder takePicDialog = new AlertDialog.Builder(MainActivity.this); takePicDialog.setMessage("123"); takePicDialog.show(); CameraUtil.getInstance().camera(MainActivity.this); } 请问有什么解法吗? 感谢
The text was updated successfully, but these errors were encountered:
已解決 以下提供我的方法讓有相同問題的人能夠乘涼 將dialog的import改成以下: import android.app.AlertDialog;
就解決了
Sorry, something went wrong.
No branches or pull requests
我想在点击"我要拍照"的按钮时跳出Dialog
但是会直接闪退
请问有什么解决方法吗?
以下为"我要拍照"按钮的listener
if (ActivityCompat.checkSelfPermission(activity, Manifest.permission.CAMERA)
!= PackageManager.PERMISSION_GRANTED) {
//未授权,提起权限申请
ActivityCompat.requestPermissions(activity,
new String[]{Manifest.permission.CAMERA},
AppConstant.PERMISSION.CAMERA);
} else {
AlertDialog.Builder takePicDialog = new AlertDialog.Builder(MainActivity.this);
takePicDialog.setMessage("123");
takePicDialog.show();
CameraUtil.getInstance().camera(MainActivity.this);
}
请问有什么解法吗?
感谢
The text was updated successfully, but these errors were encountered: