Android 13 - Image Picker

Hello everyone,

I’ve been using image picker sucessfully for the last few months, but now I noticed it is not showing on Android 13 device.

Please note that this is not our typical issue about no image showing after picking. The problem here is the picker itself is not showing at all.

When I click the image picker button, instead of seeing a media choose dialog, I get the following error:

“The permission READ_EXTERNAL_STORAGE” has been denied"

But, as I’m on Android 13 device, I did the new way of asking media permission which is:

  • On app start ask for READ_EXTERNAL_STORE
    • If allowed → initialize screen
  • If denied (android 13) → ask from READ_MEDIA_IMAGES
    • If allowed → initialize screen

This method shows permission asking dialogs correctly both on Android < 13 and 13. On older devices, image picker is working just fine.

Here are those permission blocks:

My interface looks like this:
image

This is the image picker visible component. When I click on it, it gives me the error mentioned before.

Does anyone know a solution to this? I wonder if its something about image picker or in my project itself.

Thank you in advance for any hints.

1 Like

I found a solution using AcitvityStarter, as follows:

image

It created implications afterwards on uploading the picked image via firebase storage extension (I guess it doesn’t understand the “content://” format returned by PICK intent), which I solved by implementing upload to firebase storage via REST API using the default Web component. But the whole thing took me about 8 hours to figure out.

I hope this helps someone in the future.

9 Likes

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