Android IDE (AIDE) Support Forum

How to pick an image from gallery in android 10

Does someone know how to load an image from gallery? I developed an app where you have to upload a profile picture, works nice upto android 9, but on android 10 it throws a permission related exception, I read on stack overflow that adding this permission to my manifest would fix the issue
android:requestLegacyExternalStorage=“true”

But it’s not recognized by AIDE, it underlines that line as an error.
Please help me.

Never mind, found a solution. As we know Android 10 has scooped storage. So the solution was, to copy programmatically the image to the app internal folder and then do whatever I wanted to, (compress it and upload it to firebase). If anyone is looking for this kind of help I’ll be happy to help.

1 Like