How to skip or avoid 'retake and review' option after captureing photo from camera using ACTION_IMAGE_CAPTURE

末鹿安然 提交于 2019-12-01 03:27:20
Divers

Actually it's quite useful to have confirmation of taken picture. But, in case if you really don't want to have it, you have to use SurfaceView inside your app and show camera stream here. There is tones of example how to do it, for example consider to check that one.

Use method setImageURI() it will get the bitmap from the uri and set it for you.

Yes it will set the image weather the user press ok or cancel no matter because your file exists on your given path while launching intent.

 @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {

    if (requestCode == PICK_FROM_CAMERA) {
        // only one line code
        ivSelfie.setImageURI(mImageCaptureUri);
  }   
}

You cannot avoid that screen. The reason is that when you use new MediaStore.ACTION_IMAGE_CAPTURE you are using a different camera application for clicking image. Showing this screen might be the default functionality of the. This screen will be different in different devices depending upon the camera application.

So to get rid of this the only thing you can do is to implement your custom camera instead of using default camera application.

Nikunj Patel

As per default camera app you can't breach that functionality. Instead of, you can use SurfaceView to capture image inside you application. Please have a look at this answer thread.

May be this link will help you.

Thank you

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