简体   繁体   English

Android:如何在不显示预览的情况下捕获图像

[英]Android: How to capture image without showing preview

I am using the following code to capture the image in Android 我正在使用以下代码在Android中捕获图像

Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, 100);

After capturing an image, its showing a preview and asking whether to save or discard the image. 捕获图像后,其显示预览并询问是否保存或丢弃图像。

Is there anyway where i can avoid this preview? 无论如何,我可以避免此预览吗?

The Camera app in Android dosent shows the preview. Android剂量仪中的“相机”应用程序显示预览。 So there should be a way i guess. 所以我应该有一种方法。

Thanks in advance. 提前致谢。

The camera app doesn't give other apps the option to disable the confirmation screen, even though the camera app itself doesn't show the confirmation screen. 相机应用程序没有为其他应用程序提供禁用确认屏幕的选项,即使相机应用程序本身未显示确认屏幕。

Therefore it is not possible for not showing the confirmation screen. 因此,不可能不显示确认画面。

However we can achieve this by writing a custom app using the Camera library in android. 但是,我们可以通过使用android中的Camera库编写自定义应用来实现此目的。 (see this and this ) (见

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM