Skip to content

Commit e780f88

Browse files
authored
fix: add the correct permissions to the camera intent
1 parent 52b9da9 commit e780f88

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

android/src/main/java/com/imagepicker/ImagePickerModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public void launchCamera(final ReadableMap options, final Callback callback) {
9191
}
9292

9393
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, cameraCaptureURI);
94+
cameraIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
9495

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

0 commit comments

Comments
 (0)