Image does not appear when using the image picker in the apk

In this thread, resolved by our colleagues: What is the best image selector? - #40 by Taifun
I encountered the following issue. When I use the companion to select an image from the gallery, it appears and saves to Cloudinary. When I do this via the APK, the screen goes black, freezes, and nothing appears, not even the “Wait” or “Close app” messages.
For photos, I can take, display, and send them to Cloudinary via the companion or the APK.
See the steps below.

I used android.intent.action.GET_CONTENT instead of android.intent.action.PICK. In this one, the image appears, but it doesn’t send the photo to Cloudinary, and a message appears asking if I want to wait or close the app. This is all in the apk.

If anyone wants to test it, follow the aia.
imagens.aia (409.7 KB)

Use logcat to find out what’s going on

Taifun

Have you requested permission to access the files in the shared folders?

It says the image is loading! The problem is that the app freezes during the process.

1 Like

Unfortunately, Kodular and the Cloudinary component lack a block to report loading errors.
Use screen1.errorOccurred without a conditional and see if it gives you anything.

I used screen1.errorOccurred just to see the error message, and here it is when I launched the app. This is before I even selected the image.

I saw a post about this permission issue and the solution. Would this work for me?

The extension he is using has a block to catch errors.

Your application shouldn’t require write permissions,

Does that error appear without clicking anything?

I did as per the video but it didn’t help at all. This error only occurs on Android >10

I think the error comes from this component

I didn’t have any problems here. Kodular does give permissions errors. Stop messing with Kodular.
Android 15

I’ll respond to both of you, Gianluca and Gaston.
Gianluca, I’m not using the Image Editor component.
Gaston, the Initialize and Permission Granted blocks:
In this IsPermissionGranted Permission condition, you used Niotron. In Kodular, would it be Are Permissions Granted?
Another thing, was this test you ran on the companion or the APK?
According to you, I said to stop messing with Android 15. What did you mean by that?
I’ve seen apps on the Play Store stating that they only support Android up to, for example, 11. Is there a way to limit this?

Yes :grin:

Even if he’s not used in the blocks just because he’s on the influence list? Honestly, I didn’t know that. :grinning_face_with_smiling_eyes:

1 Like

I removed the image editor from the project, compiled the APK, and although the message no longer appears, I still get the same error. When I click on the image in the photo gallery, it freezes for a while and then the screen goes dark.

I’ll test it on another device with Android 9.

Try this, if you haven’t already, and let me know.
blocks

1 Like

Gianluca, you’re the man!
It worked! Awesome!
We can finish as resolved

1 Like

Even if you’ve already solved the problem and the answer to @RaYzZz is the same as the one I gave you before, good for that.

It always compiles on the highest API version, what you can limit is which one onwards.
Nio*tron allows you to choose both parameters, but kodular does not.

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