I got questions about Android 6 (Marshmallow) runtime permission. If user wants to pick a photo from gallery, should we ask for READ_EXTERNAL_STORAGE
permission?
Seems like I could access the gallery even though I turn off the Storage permission.
You need to ask for READ_EXTERNAL_STORAGE. You will be able to access the gallery without it, but if you want to do anything with the media you get from the gallery you will need the READ permission.
A quick test on what happens in onActivityResult after an image has been picked form the gallery:
Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=8405, uid=10177 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With