After SDK33: required storage permissions on Android 13+ (READ_MEDIA_...) missing

A post was merged into an existing topic: Can’t build aab

I´m simply saving the canvas, and the error pop ups. It worked fine before the update. Seems permissions declaration are not updated with the new target API.

Where are you storing the canvas?

What is the complete filename including path in your example?

EDIT: I just have seen it in your other post… in ASD…

Taifun

2 Likes

yes, in my case, the user can create multiple albums with different names.

Then they tap the card buttons you see below, and replace by a drawing they make.

The name of the path will be: “/name of the album/cardvalue.jpg”, in ASD.

1 Like

2 posts were merged into an existing topic: I cant see sdk 33 ? new version

You might want to do sone experiments using this extension

See also this thread

Taifun

I have the same problem as you. canvas can not read
Can you solve the problem? Please tell me.

Storage permissions have never been required for the ASD (since API 19, KitKat). And that’s not the case even after SDK 33 uopdate (checked with Canvas). Create and post the smallest possible test aia that shows the supposed problem. Also show your relevant blocks in advance.

And again to everyone:


Do not send me PMs :bangbang:
I cannot and will not answer!

2 Likes

Thank you for your help, Anke. I have always very much appreciated the input and contributions you’ve made to this community and the AI2 one as well.

I don’t ever send unsolicited PMs, and I’m by no means excusing them, but I think with all the issues going on with Kodular just now, there are probably a lot of desperate people trying to get their projects working and with no help or updates coming from Kodular staff, they’re probably looking are mods and gurus/long-standing respected members to try to get assistance.

That is clearly not fair on you guys, but we really need someone from Kodular to get onto this forum and tell users what’s going on and when they’re planning to have the issues fixed (or at least the key ones). It’s been going on for over 6 days now.

1 Like

I tried this extension, and the permission for images is asked correctly. The canvas are saved.
The problem is when I try to retrieve the canvas drawing in the dynamic component, and the error “908 PERMISSION_READ_STORAGE” pop ups.

Before the API 33 update, my app was working fine, without declaring any permissions.

Now, I compile and I get this error when try to retrieve the canvas image.

“908 PERMISSION_READ_STORAGE”

This is basically what I do:

Captura de pantalla 2023-10-22 003328

Check if the path of the canvas exist, if so, retrieve the canvas in the dynamic component.

1 Like

This is anything but a simple example and, moreover, relevant blocks are missing. This doesn’t help anyone see where your problem might be.

Here is a simple example where a circle is drawn using Canvas, saved to the ASD and then displayed using an Image component. Of course, no permissions are required at all.

Screenshot -> Companion

No problem, neither with Companion nor the compiled app (APK). So your supposed problem lies somewhere else.


So again: Post a SIMPLE test aia that reproduces the problem.

2 Likes

My process is basically the same as you posted, with the difference I use Dynamic Image instead a simple image.

After testing, the error shows when I try to update only the Dynamic image with the canvas path. If I update a simple image (like the one you posted), it works fine.

So could it be a bug with the dynamic component after the last API update maybe?

This is basically the main block that I think causes the error

blocks

As I said before, the canvas is saved correctly in ASD.

I would like to post a simple aia file, but my app has more than 4000 blocks, so I have to create a new project with few blocks to test only this.

1 Like

Tested with the APK on Android 13. As expected, no storage permissions are requested (regardless of whether dynamic components are used).

that´s the dynamic component extension by yusufcihan? in my case I´m using the one from Kodular, was thinking trying with this one to see if it solves

:question:

I mean you´re using an extension for Dynamic components.

I´m using the one from Kodular

Captura de pantalla 2023-10-22 212147

I’ve never used any of these dynamic things - fortunately, because it just saved me time and trouble.

Dynamic_Image only works with storage permissions (regardless of the path, including the ASD) and then only with an absolute path for the ASD and even worse only up to Android 12. (For non-ASD-paths it works only with a full path.)

On Android 13+ it no longer works at all for the ASD

  • not with a full path
  • not with an absolute path
  • not with storage permissions.

There are other problems, which I don’t want to mention all here.

1 Like

Thank you so much for clarifying and for your help.

Dynamic image was working fine just until before the update, on Android 13, but now I will need to look to modify my app using the dynamic extension.

EDIT: I just updated my app with Dynamic extension and it´s working perfect now, the problem was with kodular dynamic image.

1 Like