Problem with Android 11 accessing Storage

Here they are:

Also, upon further testing, I am facing the same issue on an Android 10 Device as well.

(If the blocks in the image aren't legible, then just right click --> open image in new tab and zoom in )

1 Like

Also, I don't think that the problem is anything with the tempComponent variable, as in an earlier version of the App, the when any image.click wasn't there, as it would straightway choose image1.picture in the attachment column

Also see

The problem seems to be with the Android 10 / 11 or maybe because both the Android 10 and 11 are OnePlus phones and the Android 9 is a Samsung phone

and post the result of grafik

Do It Result: "["/storage/emulated/0/Pictures/app_inventor_1619768163890.jpg"]"

(Right now, I have tested all of this on the Android 9 phone)

Ok, and this image does not exist on Android 10+ (in this path).
The image is saved in the ASD.

Oh, I got it. Can you tell me is there any way to check the Android Version of the current device, and then accordingly I'll make it enter the path ?

Android > 9:

grafik

See also here:

Thanks ! I'll just look it up and then if it works; will mark it as solution.

Just curious, shouldn't the path of the picture, by default, be that of how it is saved? Like I am only removing file:// from the path of the image already there, not specifying another path.

So, even if the paths are different, the segment text block should still edit it the same way and give the result respective to what the original path was?

Hope i'm not confusing you :upside_down_face:

Yes, make a test on your Android 10+ device and check ...

Take a look at your topic!
Does it make sense to test on an Android 9 device (when I'm trying to help you with an Android 11 problem)?

2 Likes

Sorry, the Android 11 Device is my mother's phone, and she was using it, so I couldn't test using it.

Right now, upon testing with the Android 11 Phone, I still wasn't able to figure out how exactly do I solve my problem.

I even tried giving the full file path (/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/Pictures/app_inventor_1619777203718.jpg) as an attachment, but it still isn't working.

Even If I use that extension, how exactly do I make it work?

Did you check if this file exist?

grafik

to copy into this directory
Unbenannt
will not be possible anymore after App Inventor targets SDK 30...
you should completely remove that block, because the image will be stored in the ASD anyway...

Taifun

It's False. What could be causing this? (I removed the copyfile block, but the result is still false.

Hi, I thought of one way in which I might be able to make it work - if I use the Component to Image Extension, and then the output of which I can use in the attachment column of the share block.

Do you think it would work? I will try it, and then get back.

This method worked. If anyone wants to know, here are my blocks:

blocks (2)

Thanks @Anke and @Taifun for helping me.

1 Like

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