android.permission.WRITE_EXTERNAL_STORAGE doesn't function anymore

Please :upside_down_face:, what are we talking about here?

Blocks

the background image of canvas1 is bg1.jpg, then you save it in /aa/aa.jpg
I would set canvas2 background to /aa/aa.jpg, when I try to do it I have blank background

exacltly, months ago went well, Now doesn't go well

In other words, how can I load an image, modify it and save it for loading by other apps ?

Try this:

OK, now it runs well, but my question was

I'm not able to load image with this block

Try this:

grafik

1 Like

Finally your block runs well, this thread is solved for me, maybe also for Pierfrancesco

I'm sorry, now I can not able to save in MyFolder

Yes, because you basically have to specify the relative path when a component (like File, Canvas, etc.) saves something. The relative path:

/myFolder/aa.jpg

refers (is redirected) in Canvas for devices with API> 28 to the following absolute path:

/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/aa/aa.jpg

See also here:

https://community.appinventor.mit.edu/t/solved-web-component-not-saving-files-to-asd-in-companion/16851/6?u=anke

OK, now I can load the image, but why I need ask for permission for saving with clock ? these block does not work

I had already explained that:

Read the full thread and open your own topic so we don't digress further here.

Yes, I know, but I did not understand well, can you explain me in other words ?
I don't like using code without understanding it.

What's so hard to understand about "it's a bug".
@ewpatton might want to explain what caused the bug.

I can not understand your workaround with 2 clocks

Yes, I could explain, but it would take a lot of time and effort. Since the bug will most likely be fixed soon, my workaround would be obsolete.

You are right, these are my blocks, they works well with Companion, but no saving with apk

My workaround: save in private dir then copy file to myfolder
blocks

@patel Yes, this is still possible so far, but no longer if AI2 targets Android 11 (API 30),
→ by the end of 2021 at the latest.