How can I detect wether the user take picture and selects it (with the confirm button on camera) or they just turn on a camera, take a picture and remove it (with the cancel button on camera)

When the user take picture I am loading that picture into an ImageView. If user hits confirm button then everything is OK but if user don't want that picture and decide to hit cancel button then the `ImageView` goes blank.

This is my camera intent : 

```
void capturePhoto() {
//        ImagePicker.pickImage(this, "Select your image:");

        Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
        // Ensure that there's a camera activity to handle the intent
        if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
            // Create the File where the photo should go
            File f = null;

            try {
                f = setUpPhotoFile();
                mCurrentPhotoPath = f.getAbsolutePath();
                Uri photoURI = Uri.fromFile(f);
                takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);
            } catch (IOException e) {
                e.printStackTrace();
                f = null;
                mCurrentPhotoPath = null;
                pictureUri = null;
            }

            startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);
        }
    }

```

And onActivityResult, in both cases the resultCode is always 1. (note that RESULT\_OK is -1) and I dont know why.

This is how I set `image` to `ImageView` using Glide:

```
Glide.with(this).load(mCurrentPhotoPath).centerCrop().into(imageView);

```

Any Suggestions?

**Thanks!**