Exposed beyond app through intent.getdata() (Image Picker Kodular)

Two similar applications, two totally different results.
I am using an extension called “CropImage” which allows me to set a perfect square to crop to the images I select with the Picker.
Only that in the first app (test) the crop works on both compaion and apk, while in the second case it works only on companion, and in apk it gives me that error message.
How can I solve? I am attaching the images with the blocks.

immy2

EDIT: The only thing i found on the internet about the problem is this:

FileProvider is a special subclass of ContentProvider that facilitates secure sharing of files associated with an app by creating a content:// Uri for a file instead of a file:/// Uri .

so i tried replacing file:// with content:/ but the result is this

and it goes on and on and on…

you can’t modify a file in the assets… you first have to copy it from the assets to the internal sdcard… you can use for example the file extension for that
https://puravidaapps.com/tools.php
Taifun

The image user wants to edit is in Makeroid folder(external storage) and I think it is for testing purpose only.
Since Image Picker uses intent to pick image so it is obvious that it will return a file uri so extension developer will have to convert file uri to content uri.
You should contact extension developer @andreapetricola

I’m not shure about this, but you don’t need add permission to read external storage ?
See image picker documentation
https://docs.kodular.io/components/media/image-picker/

:thinking:
Edit: Try delete “file:” from you path

Yeah, but why in the first app this work fine and in the other app (who is technically the same thing) don’t?
Originally the second app was a copy of the first app, and worked fine like the first app.
So I really don’t know why the result is so different with the same extension in two similar app with that similar block

Where should I add the permission to read external storage?

The file isn’t in the assets but in my gallery, and instead of this, in one app the picker and crop work fine, but in the other not

It is mandatory to use content uri since Api 24.

Man, read my post entirely, I switched file:// with content:/ but the result is the black image with dynamic circle of progressing who goes on and on and on without stopping.

Adding content:/ at start of uri does not make an uri a content uri.
This is what it does:
A content URI allows you to grant read and write access using temporary access permissions.

this
Unbenannt
is the path to the assets for the companion app
Taifun

Ah i’m sorry…but never mind because:

  1. the error appear for every image in gallery with every path
  2. the error appear ONLY in second app, while in the first app all works fine, with every path

Ask when needed using this block:
https://docs.kodular.io/components/screen/#ask-for-permission

What Android version do you have?

Android 10…but in one of the two app I put in the topic, image picker and crop work, while in the other not, so don’t think that the problem is the android version

so don’t think that the problem is the android version

Actually it might be, someone on Android 9 got this error with my extension… I’m not sure if anyone else gets them because not many people like reporting the bugs to me, but it works on Android 8 and stops at 9. It doesn’t even work for Android 10 for me.