I'm using these codes to capture and store an image on a button click. 

```
takePhoto.setOnClickListener(new View.OnClickListener() {

    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        destination = new File(Environment
                .getExternalStorageDirectory(), 
                preferences.getSelectedItem().getItemNo() + "_" 
                + preferences.getSelectedItem().getChasisNo() + "_up");
        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
        intent.putExtra(MediaStore.EXTRA_OUTPUT,
                Uri.fromFile(destination));
        startActivityForResult(intent, TAKE_PHOTO_CODE);
    }
});

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (requestCode == TAKE_PHOTO_CODE && resultCode == RESULT_OK) {
        FileInputStream in;
        try {
            in = new FileInputStream(destination);
            BitmapFactory.Options options = new BitmapFactory.Options();
            options.inSampleSize = 10;
            imgPath = destination.getAbsolutePath();
            // Bitmap bmp = BitmapFactory.decodeStream(in, null, options);
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        Log.d("Image saved", "Image saved at " + imgPath);
        upItem.setUpPhotoURL(String.valueOf(imgPath));
        isPhotoAttached = true;
    }
}

```

But when I capture the photo and try to confirm it, app does nothing. Cancelling and retaking options work perfectly but confirming the taken image doesn't do anything. Can anyone point me where the problem lies here?