我对拍照并保存的代码有疑问。当我启动Camera()时它崩溃了。你能帮我吗?
private void launchCamera() {
try {
mOutputFile = File.createTempFile("prova", null);
Intent intentCamera = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
intentCamera.putExtra(MediaStore.EXTRA_OUTPUT,
Uri.fromFile(mOutputFile));
startActivityForResult(intentCamera, CAMERA_REQUEST);
} catch (Exception e) {
Toast t = Toast.makeText(this, "ERROR:\n" + e.toString(), Toast.LENGTH_LONG);
t.show();
}
}