Stop requesting broad Android media/storage permissions - #6740
Merged
Conversation
Google Play's Photo and Video Permissions policy rejects apps targeting API 33+ that declare READ_MEDIA_IMAGES / READ_MEDIA_VIDEO when the system pickers are sufficient, and it flags the legacy *_EXTERNAL_STORAGE permissions when they are unbounded. - flet-cli: the "microphone" cross-platform permission bundle injected READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE along with RECORD_AUDIO, so every app built with `--permissions microphone` got broad storage access it never asked for. Recording only needs RECORD_AUDIO; recordings go to app-scoped storage. - client: drop READ_MEDIA_AUDIO, READ_MEDIA_VIDEO and both *_EXTERNAL_STORAGE from the Android manifests. File access goes through the storage access framework, which needs no permission. - docs: Video and AudioRecorder no longer hand out these permissions as a copy-paste block; explain when they are actually needed, bound the legacy ones with maxSdkVersion, and warn about the Play policy in the Android publishing guide.
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.
Google Play's Photo and Video Permissions policy rejects apps targeting API 33+ that declare
READ_MEDIA_IMAGES/READ_MEDIA_VIDEOwhen the system pickers are sufficient, and it flags the legacy*_EXTERNAL_STORAGEpermissions when they are unbounded. Flet was handing these out by default in three places.Changes
flet-cli — the
microphonecross-platform permission bundle injectedREAD_EXTERNAL_STORAGEandWRITE_EXTERNAL_STORAGEalongsideRECORD_AUDIO, so every app built with--permissions microphonegot broad storage access it never asked for. Recording only needsRECORD_AUDIO; recordings go to app-scoped storage.client — dropped
READ_MEDIA_AUDIO,READ_MEDIA_VIDEOand both*_EXTERNAL_STORAGEfrom the Android manifests. File access goes through the storage access framework, which needs no permission.docs — Video and AudioRecorder no longer hand out these permissions as a copy-paste block. They now explain when the permissions are actually needed, bound the legacy ones with
maxSdkVersion, and the Android publishing guide warns about the Play policy.Why it matters
Apps that never touch the media store were shipping permissions that can get a release rejected at review. The fix is subtractive — nothing gains a capability it didn't have, and anything that genuinely needs media access can still declare it explicitly via
[tool.flet.android.permission].Summary by Sourcery
Remove default broad Android media/storage permissions and align manifests, CLI presets, and docs with Google Play’s Photo and Video permissions policy.
Bug Fixes:
Enhancements:
Documentation: