昨天调用系统相机拍照制作头像的时候遇到个问题,相机拍完照后返回后直接闪退,那么问题出在哪呢?先看看当时的代码:
Intent cameraIntent = new Intent("android.media.action.IMAGE_CAPTURE");
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT,getImageUri());
cameraIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);
activity.startActivityForResult(cameraIntent,Constants.CAMERA_REQUEST_CODE);
//onActivityResult回调中,
if (resultCode != RESULT_OK) {resizeImage是裁剪图片
return;