Read image file located in ASD

As I said and showed, on Android 11 no permissions are required for this.
So try my test APK on a Android 11 device.

1 Like

Unfortunately I only own an Android 10 device (my Galaxy A7 2018).
The errors shown that occurred on the Android 11 device were mentioned to me by users using my app.
Does this mean that on an Android 11 device the error message 908 I put in my last post will not appear? Is there a way to make it disappear from other devices? Because it keeps appearing on mine.

Yes no permission was asked.

Yes, on Android 11. And it should work the same way on Android 10, but it doesn’t (this should be fixed). EDITED Sept 28, 2021

1 Like

1 Like

@India_Learn Correct, thanks, I checked it again.
(Apparently my first attempt failed because the file already existed in the folder before and was then deleted. So I just had to change the filename.)

Can you please share this aia file I have similar problem in my project.

I am using Juan Antonio’s extension com.KIO4_Base64.aix to convert file to Base64 string.
I am able to convert image, video and audio files to base 64 string.

Fine, so where is the problem?

@bodymindpower Thanks for reply.
I was using old version of extension com.KIO4_Base64.aix that’s why it was not working on android 11 device.
Still I am not able to convert pdf file (located in Download folder) to base 64 string.
Is Download folder not a shared folder? How can a file be copied to ASD from Download folder?

the folder /Download is part of the shared storage, see also the overview here

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

@Taifun @bodymindpower Thanks for reply.
What I wish to do -

  1. Using File picker - Pick a file (jpg,mp3,mp4,pdf)
  2. Convert it to Base64 string
  3. Upload file using Google App Script to Google Drive

I am able to do this for all files except pdf files. I am trying to do this on Android 11 device.
However, I am able to upload all kind of files including pdf files using Android 10 (or below devices).
If required, I can share aia file also.
Below, are the relevant blocks -



GotString

No, only for media files.

Yes, and exept all the other non-media files (like .txt, .csv, ...), because they can only be accessed if they are created by the app itself. You need SAF for this. See also here.

@bodymindpower Thanks for reply & guidance.

@bodymindpower @Taifun @vknow360
I am trying to grant permission to Documents folder using SAF extemsion.
Blocks -
blocks - 2021-10-03T115251.887
blocks - 2021-10-03T115256.438
![blocks - 2021-10-03T115251.887|451x116]

I get following error -
No persistable permission grants found for UID 10438 and Uri primary:

Am I missing any step?

Which dir did you choose?

@vknow360 Thanks for reply
I choose Documents directory.



You have to set Label2 text to uriString.

@vknow360 Thanks for reply & guidance.
I will get back to you .