ImagePicker launchImageLibraryAsync can be opened after denying permissions

Please provide the following:

  1. SDK Version: 37
  2. Platforms(Android/iOS/web/all): Android and IOS

Hi! Thanks for the great work.
I don’t know if this is an issue or a misunderstanding of mine.
I’m trying to make a really simple image picker for the user.
Before calling ImagePicker.launchImageLibraryAsync() I’m calling ImagePicker.requestCameraRollPermissionsAsync() and was expecting that if the user denies the permission the gallery won’t open, but it does!

To reproduce this, just try the snack provided in the ImagePicker documentation, and deny the permission.

Tha’s the correct behaviour? I have to prevent calling ImagePicker.launchImageLibraryAsync() if the status of the permission is denied? I was expecting something similar to the expo-location behaviour.

Thanks in advance to help me understand this better!

Hey @matias.calvo,

Could you create a standalone iOS binary and see if the behavior is reproduced there as well? If not, it may be the result of some conflicting permissions within the Expo client.

Cheers,
Adam

Thanks for the answer, @adamjnav. I’ll try it and update the topic :+1:

Much appreciated! Let me know if you run into any issues when you try to do so.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.