Skip to content

fix(android): stop requesting READ_MEDIA_IMAGES to comply with Play photo picker policy - #2355

Merged
martinbedouret merged 1 commit into
masterfrom
fix/photo-picker-remove-read-media-images
Sep 24, 2026
Merged

martinbedouret merged 1 commit into
masterfrom
fix/photo-picker-remove-read-media-images

Conversation

@martinbedouret

Copy link
Copy Markdown
Collaborator

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_VIDEO when 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 uses ACTION_OPEN_DOCUMENT). That picker grants per-URI read access and requires no media permission, so READ_MEDIA_IMAGES was unnecessary.

This PR removes READ_MEDIA_IMAGES from the runtime permission request in requestCvaPermissions().

Changes

  • src/cordova-util.js: remove READ_MEDIA_IMAGES from the androidPermissions requested at runtime.

RECORD_AUDIO / READ_MEDIA_AUDIO are 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's config.xml (and regenerated AndroidManifest.xml) so the built AAB no longer declares the permission. That change lives in the Cordova wrapper repository, not here.

Testing

  • Android image selection continues to work through the SAF system picker (no permission prompt needed).

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
martinbedouret merged commit 0749723 into master Sep 24, 2026
5 checks passed
@martinbedouret
martinbedouret deleted the fix/photo-picker-remove-read-media-images branch September 24, 2026 03:14
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