Skip to content

Commit 5f330a0

Browse files
committed
Add explicit URI permission for camera intent
required for newer API versions
1 parent bed6fbd commit 5f330a0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

app/src/main/java/de/stephanlindauer/criticalmaps/handler/StartCameraHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public void execute() {
4242
outputFile);
4343

4444
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
45+
cameraIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
4546

4647
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageCaptureUri);
4748

0 commit comments

Comments
 (0)