without granting READ_EXTERNAL_STORAGE permission at runtime?
I have a webView app and in the website chat section, when i click on the camera icon, it brings up the phone gallery, even though I have not given the permission!
I think it's the photo picker
That's right I found this answer: Picking Media with Intents: When you click on the camera icon and it brings up the phone gallery, it likely uses an intent to let the user select a photo or video. This process does not require READ_EXTERNAL_STORAGE permission because the media picker provided by the system handles the permission implicitly. Media Picker: Starting from Android 13 (API level 33), there's a new PhotoPicker API that further improves this by providing a system-managed interface for users to select photos and videos. This picker does not require any storage permissions and provides access only to the media files selected by the user.
Another way to think of this is the permissions api does not allow you to select an image without the users knowledge, the picker is the user expressing consent
Обсуждают сегодня