image_picker_try.aia (1.6 KB)
In MIT Companion I can get the address of the image, it works, but when I install this app and choose an image, the app closes.
image_picker_try.aia (1.6 KB)
In MIT Companion I can get the address of the image, it works, but when I install this app and choose an image, the app closes.
Have you given read permission, image picker needs that
I assume you are testing it on Android < 10 with the APK. There the image is copied to a special directory of external storage and not to the ASD as with Android 11+. Therefore WRITE
permission is required for this on Android < 11). However, your app does not declare any storage permissions (READ
or WRITE
) in the Manifest.
So set DefaultFileScope = Legacy and try again. Otherwise, I can only recommend not to use the ImagePicker
, but to do it via Activity starter.
Indeed, I use Android 9, by DefaultFileScope = Legacy the problem is solved.
Thank you @Anke.
Yes, and you are right.
It is a bug
because the ImagePicker
should / must declare WRITE
permission on Android < 10
(without setting DefaultFileScope = Legacy).
The problem with setting DefaultFileScope = Legacy is that it also sets the FileScope for some components (e.g. Canvas). To avoid this, my extension should be used:
Error 908: The permission WRITE_EXTERNAL_STORAGE / bug
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.