title: ANDROID: Remove 'save' and 'discard' buttons
body: <p>How can I remove confirmation display ('save' and 'discard' buttons display) after capturing image?</p>
  
  <p><img src="https://i.stack.imgur.com/iDqK8.png" alt="enter image description here"></p>
  
  <p>I want to remove second step without changing application functionality: after <code>startActivityForResult</code> function go to <code>previewCapturedImage()</code> function.</p>
  
  <p>It's my code:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
  private static final int CAMERA_CAPTURE_IMAGE_REQUEST_CODE = 100;
  public static final int MEDIA_TYPE_IMAGE = 1;
  private static final String IMAGE_DIRECTORY_NAME = "OpenCV Demo";
  private Uri fileUri;
  
  private ImageView imgPreview;
  private Button btnCapturePicture;
  private FrameLayout  frameLayout;
  private TextView textView;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_8, this, mOpenCVCallBack))
      {
          Log.e("TEST", "Cannot connect to OpenCV Manager");
      }
      setContentView(R.layout.activity_main);
  }
  
  private void captureImage() {
      Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  
      fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
  
      intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
  
      // start the image capture Intent
      startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);
  }
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      // if the result is capturing Image
      if (requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE) {
          if (resultCode == RESULT_OK) {
              // successfully captured the image
              // display it in image view
              previewCapturedImage();
          } else if (resultCode == RESULT_CANCELED) {
              // user cancelled Image capture
              Toast.makeText(getApplicationContext(),
                      "User cancelled image capture", Toast.LENGTH_SHORT)
                      .show();
          } else {
              // failed to capture image
              Toast.makeText(getApplicationContext(),
                      "Sorry! Failed to capture image", Toast.LENGTH_SHORT)
                      .show();
          }
      }
  }
  private void previewCapturedImage() {
         //TODO something
      }
  </code></pre>