android.permission.WRITE_EXTERNAL_STORAGE doesn't function anymore

Hi,
I have tried on 2 smartphone
android.permission.WRITE_EXTERNAL_STORAGE doesn't function anymore
Like in picture I have separated by a clock (100 and 300ms) the works
Can you try and confirm and find a solution?
Thanks a lot.!

The companion app asks for write permission up front since that's how it stores assets. If you're trying to do this in an installed app, once you've granted the permission you won't need to ask for it again. Check to see if in the Settings app you've already granted file permissions to the installed app.

in the installed app I click yes about permissions but It's the same. Nothing.
A month ago was ok,

It's a bug, on Kodular something go well, i have saved but then doesn't call back the jpg from the storage when I need

don't use a clock to ask fo permissoins, this does not make sense
How to save a canvas

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

Hi Taifun, I have used a clock simply because using the Initialize, the screen1 title (look my picture) doesn't change.
I have separeted the works by a clock only for this.
I repeat months ago the same procedure was ok.
Can you try (using Initialize or a clock, It's the same) and confirm that now is a bug?

ask for permission during screen.initialize and test it using the apk file
Taifun

No, it's not the same.

But it's true, there is a bug. → @ewpatton
testPermissionCanvas.aia (3.5 KB)

Hi Anke,
yes, I need a clock to start the permission request but the canvas is not saved.
I've tried your example with AI companion and with APK but the canvas is not saved.

Taifun have you tried? Months ago was ok but now there is a bug.

no, sorry, no time for this... but I trust @Anke completely... :wink:
Taifun

Try this:

Which Android version does your test device have?
If API > 28 (> Android 9) the image is save in the ASD:

Companion:

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

Compiled app (APK):

/storage/emulated/0/Android/data/<packageName>/files/aa.jpg

Anke's aia runs well on Android 10

Hi Anke, yes, like you, but months ago the image was saved directly in the primary internal memory. I can accept this new location but I'm not able to resume the imagine saved in a second time when I need ( I have tried various file path)

I don't understand what exactly is the problem?

"set Canvas1.Backgroundimage to" /storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/aa.jpg
or others path?
I've tried without solutions,
Now I'm resolving with ImagePicker

Try this: testPermissionCanvas_2.aia (93.4 KB)

Infact /aa/aa.jpg is totally blank

Of course, because you created this empty image with Canvas:

grafik

months ago was possible to save a canvas image direcly in the primary memory and then resume it simply with "set canvas1.background to" "/folder/picture.jpg". Now the canvas is saved in a long path and is impossible to resume it.

If I save a Canvas in /aa/aa.jpg I can't resume it from /aa/aa.jpg

Ok, I change strategy, now I'll use the imagePicker