Hi @Anke
I tested your suggestion in android 16 and it works!
Thank you very much!!
Do I have to make the same (completely remove if-then-else and GetRealPathFromURI) in these two blocks?
Thank you @Anke
To find it out yourself, use again Do it as you already did earlier
Taifun
Yes, LGTM if the ImageConverter extension needs a full path to work.
But as I said before, why not try it yourself?
Hi everyone
I have some problems in Android 16 when using "imageConvertor" and "copyImage".
If I use Android 8: I pick an image from my phone and no problems
but
when I switch to Android 16, my phone asked me if I would like to pick an image by using Photo app or Gallery app.
----get real path from URI
/storage/emulated/0/Pictures/MSM_abbigl_image4(1).jpg
----get real path from URI
/storage/emulated/0/DCIM/Camera/20260412_151019.jpg
Why?
It appears you're accessing images via the Photos app that aren't stored locally on your device, but rather in a cloud service like Google Drive etc.. Therefore, a real path (/storage/emulated/0/...) cannot be returned. Such files would first need to be available locally on your device (i.e., downloaded) before they can be modified.
Tank you!
How can I avoid that pick image command not only propose Gallery app, but also this Google Photo app?
If contentUri starts with that, "pick another image (located on your device)" via Notifier or something else.
Is there a way to only allow local files?
No, not in advance.
Have you tried copying the contentUri (image) to /Pictures using my copyImage extension? Please show all relevant blocks. And post the aia.
I just checked it and it works fine, as expected.
Thank you @Anke for your example!
I have used this method in another section of my app (saving images) and it works.
I will try it soon.
You are great!
The main intention of my extension was/is to provide full access to all files (not just images), regardless of where the files are stored (even in a cloud), and especially also to files not created by the app. In other words, every file that can be picked via the FilePicker, ImagePicker, or activity starter is copied to a corresponding shared folder (here, /Pictures for images), thus granting the app full access to it (READ/WRITE permission).
This is relevant for images and videos, because since May 2025, Google no longer allows READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions on Android 13+ without prior approval.
So you don't need SAF and all that complicated stuff.