Skip to content

Commit

Permalink
fix: add the correct permissions to the camera intent
Browse files Browse the repository at this point in the history
  • Loading branch information
ravirajn22 committed Mar 15, 2021
1 parent 52b9da9 commit e780f88
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public void launchCamera(final ReadableMap options, final Callback callback) {
}

cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, cameraCaptureURI);
cameraIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);

if (cameraIntent.resolveActivity(reactContext.getPackageManager()) == null) {
callback.invoke(getErrorMap(errOthers, "Activity error"));
Expand Down

0 comments on commit e780f88

Please sign in to comment.