Question: When I'm taking a photo from a camera if I'm calling

```
File file = new File(getFilesDir().getAbsolutePath() + "/myImage.jpg");
Uri outputFileUri = Uri.fromFile(file);

cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);

```

`OK button` on camera app is not functioning, simply does nothing (actually won't save it to internal memory I provided I guess and therefore the app itself does nothing).

If I however call

```
File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/myImage.jpg");
Uri outputFileUri = Uri.fromFile(file);

cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);

```

everything is fine and photo is stored on SDCard.

My question is, is there a way to store capture photo in **full-resolution** without SDCard?

Answer: 
The Camera activity will not be able to save the file into your activity's private files directory, that's why it fails quietly. You can move the image from the external storage into your files dir in onActivityResult.
You need to add permission

```
cameraIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);

```

This is possible using the file provider. Please refer sample

```
  public getOutputUri(@NonNull Context pContext) {
    String photo = photo.jpeg;//your file name
    File photoFile = new File(pContext.getFilesDir(), photo);
    Uri lProviderPath = FileProvider.getUriForFile(pContext,
        pContext.getApplicationContext()
            .getPackageName() + ".provider", photoFile);
    return lProviderPath;
  }

  private void capturePhoto() {
      Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
      cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, getOutputUri(this));
      cameraIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
      startActivityForResult(cameraIntent, 1);
  }

```

Refer following android document for more details
<https://developer.android.com/reference/android/support/v4/content/FileProvider>