fix(android): explicitly grant URI permissions for legacy camera capture#60
Draft
alexgerardojacinto wants to merge 2 commits into
Draft
fix(android): explicitly grant URI permissions for legacy camera capture#60alexgerardojacinto wants to merge 2 commits into
alexgerardojacinto wants to merge 2 commits into
Conversation
Android 18 removes automatic URI permission grants for ACTION_IMAGE_CAPTURE intents. The deprecated LegacyCameraFlow.openCamera() sent no grant flags at all for its FileProvider output URI, unlike the edit intents elsewhere in this file which already do. RMET-5241
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Android 18 removes automatic URI permission grants for
ACTION_IMAGE_CAPTUREintents. The deprecatedLegacyCameraFlow.openCamera()sent no grant flags at all for its FileProvider output URI, unlike the edit intents elsewhere in this file which already do.FLAG_GRANT_READ_URI_PERMISSIONandFLAG_GRANT_WRITE_URI_PERMISSIONto the capture intent.ioncamera-androidto 1.0.2, which contains the equivalent fix for the non-legacy camera flow (ion-android-camera#17).Part of RMET-5241.
Draft:
ioncamera-android:1.0.2is not yet published to Maven Central — this PR is blocked on that release landing. Do not merge until then.Test plan
Camera.getPhoto()(this fix) andCamera.takePhoto()(ion-android-camera fix) via this plugin's example app, built locally against a local Maven artifact forioncamera-android:1.0.2. Confirmed both work on Android 7 (API 25) and Android 17.