fix(android): stop requesting READ_MEDIA_IMAGES to comply with Play photo picker policy - #2355
Merged
Merged
Conversation
Android image selection already uses the Storage Access Framework system picker (safMediastore.selectFile / ACTION_OPEN_DOCUMENT), which needs no media permission. Requesting READ_MEDIA_IMAGES triggers a Google Play Photo and Video Permissions policy violation for apps targeting API 33+.
martinbedouret
deleted the
fix/photo-picker-remove-read-media-images
branch
September 24, 2026 03:14
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
Google Play flagged the app under the Photo and Video Permissions policy: apps targeting Android 13+ (API 33+) may not request
READ_MEDIA_IMAGES/READ_MEDIA_VIDEOwhen a system picker is sufficient.On Android, Cboard already selects images through the Storage Access Framework system picker via
window.cordova.plugins.safMediastore.selectFile()(which usesACTION_OPEN_DOCUMENT). That picker grants per-URI read access and requires no media permission, soREAD_MEDIA_IMAGESwas unnecessary.This PR removes
READ_MEDIA_IMAGESfrom the runtime permission request inrequestCvaPermissions().Changes
src/cordova-util.js: removeREAD_MEDIA_IMAGESfrom theandroidPermissionsrequested at runtime.RECORD_AUDIO/READ_MEDIA_AUDIOare kept because they serve other features and are not part of this policy issue.Note for the Cordova wrapper (cboard-org/cboard-cordova / ccboard)
The matching
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />declaration must also be removed from the wrapper'sconfig.xml(and regeneratedAndroidManifest.xml) so the built AAB no longer declares the permission. That change lives in the Cordova wrapper repository, not here.Testing