Skip to content

fix(android): explicitly grant URI permissions for legacy camera capture#60

Draft
alexgerardojacinto wants to merge 2 commits into
mainfrom
fix/RMET-5241-implicit-uri-grants
Draft

fix(android): explicitly grant URI permissions for legacy camera capture#60
alexgerardojacinto wants to merge 2 commits into
mainfrom
fix/RMET-5241-implicit-uri-grants

Conversation

@alexgerardojacinto

@alexgerardojacinto alexgerardojacinto commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

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.

  • Add FLAG_GRANT_READ_URI_PERMISSION and FLAG_GRANT_WRITE_URI_PERMISSION to the capture intent.
  • Bump ioncamera-android to 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.2 is not yet published to Maven Central — this PR is blocked on that release landing. Do not merge until then.

Test plan

  • Manual: exercised both Camera.getPhoto() (this fix) and Camera.takePhoto() (ion-android-camera fix) via this plugin's example app, built locally against a local Maven artifact for ioncamera-android:1.0.2. Confirmed both work on Android 7 (API 25) and Android 17.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant