[TIMOB-26757] Android: Add parity for "hasPhotoGalleryPermissions" and "requestPhotoGalleryPermissions"
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Unknown |
Created | 2019-01-21T09:37:06.000+0000 |
Updated | 2019-01-23T17:09:21.000+0000 |
Description
Currently, Android does not offer a way to check and request permissions to access the photo gallery. It seems like it's a similar permission to access the camera, but for the sake of parity and less platform-specific code, it could be added.
On Android, you don't need permission to select an image from the gallery. This is because the selected image is returned indirectly via a content provider. I've re-tested this on an Android P device and it's true. You only need permission to *add* images to the gallery, which is something the camera APIs already effectively offer. Although, for the sake of parity, I suppose we could hardcode these methods to return true. I suppose that's what you're after, right?
Yep, that's what I thought. If I remember correctly, some kind of API for some other permission returns a hardcoded "true" already, so that concept wouldn't be new. It's really just an effort to minimize the "if-else" cases.