Android调用系统相机拍照后不进入预览确认

在Android中如果要调用系统相机获取一张图片,大家都知道发这样一个Intent
Intent(MediaStore.ACTION_IMAGE_CAPTURE, null);
系统相机拍摄完毕后,会把刚拍到的图片预览给你,看你要确定还是取消再重新拍摄。
但是客户提了这样一个要求,就是拍摄完毕后不需要显示预览确认,也就是即拍即得。

可以在你的发送Intent的时候,启用快捷拍照:
intent.putExtra("android.intent.extra.quickCapture",true);

例如,我在通讯录联系人这个应用的相关修改地方如下,

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE, null);
intent.putExtra("android.intent.extra.quickCapture",true);//启用快捷拍照
startActivity(intent);





你可能感兴趣的:(Android调用系统相机拍照后不进入预览确认)