SAF: App Inventor implementation of Storage Access Framework

Thank you :blush:

Already did, waiting for approval.

It will work in Android KitKat and above versions but it is recommended to use SAF on Android 5.0+.

1 Like

can it work in android 11?

Done …
It’s a shame that your extensions need approval in AI2.


We are facing problem with the file component of kodular after the new update of kodular with android 11 phones
I am just creating a file in the external storage and retrieving it from the same place as per the requirement
Does it will solve the issue?

Excellent work :+1: :clap:


starting with SDK30 you should not create arbitrary directories anymore…
use the ASD or shared storage like /Download
see also the overview by @bodymindpower



Epic work @vknow360 :love_you_gesture:


My app is a offline app, which stores salary statements of the employee. I have included a tab to export the stored data to the phone to provide the user to transfer data to new phone in case the user is changing the phone.
I was storing the file directly to the external storage “/storage/emulated/0/salary”. Now this thing is not working in the new kodular update.
Pl suggest me if i want to use this extension then how to do this.


I dont know how to use this

If you can help. I need to create the file (if possible any where in phone) and save data in that

bruh why you @narender_kumar mention me ? ask from @vknow360 he is the developer of extension

Read the post and show the block what you have tried till now


I was having little bit problem to understand how it works

In .OpenDocumentTree block what I have to add in it

I added this /storage/emulated/0/Android/data path in OpenDocumentTree

When I call the block it show the /storage/emulated/0/

Actually I was trying to access text file in this path /storage/emulated/0/Android/data/com.OtherAppPrivate.Dir/files/text.txt

And trying to modifying it

Why you put the “/storage/0001-61E9” in that block

I am very confused about SAF

SAF can give you access to 90% of the file system.
But you can’t access /Android/data and /Android/obb dir and its childs.

That’s path of sdcard in my phone. :slightly_smiling_face:

Example 2

1 Like

I am understanding the concept.
Can i create folder they way you create document in your example 2

My requirement is to create folder inside the Document folder after giving permission to the Document folder

The file component is not able to create that

Yes, you just need to set correct mime type and then you will get folder uri in DocumentCreated event.

1 Like

I am on a app which copy data from whatsapp document folder which nowdays in Android/media

Is it anyhow to copy document from there
I know you have mentioned above but is there other way

here is my block

i was trying to access this


this path is other app not my app

like file manager have access to other app-specific directory

but when i call .OpenDocumentTree block it show the /storage/emulated/0/

I guess it is possible to access /Android/media dir.

You can’t access this path.

1 Like


i have doubt other app like ZArchiver can access it So :thinking: what did their done for accessing it ??

Well, hacks are available but they are temporary and can stop working any time.