Android: How to capture image without showing preview

人盡茶涼 提交于 2019-12-14 03:48:25

问题


I am using the following code to capture the image in 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. So there should be a way i guess.

Thanks in advance.


回答1:


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. (see this and this)



来源:https://stackoverflow.com/questions/11172705/android-how-to-capture-image-without-showing-preview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!