SAF: App Inventor implementation of Storage Access Framework

@vknow360,
I looked more closely again.

In the version 1.2 there exist "CopyDocumentToASD" - see picture.

This doesn't seem to exist in this version 1.3 anymore, right?

Frank

There are two versions of the SAF procedure OpenSingleDocument. The older one which I have used for several years has three inputs: title, type, and extraMimeTypes. The most recent has four inputs: title, initialDir, type, and extraMimeTypes. Could you clarify how the initialDir input is written and used? Is it essential? Is the old version now deprecated? Thanks for all the work on this very useful SAF extension. Peter

1 Like

No. No.

2 Likes

Thanks Anke. That worked well.

I guess I replaced it with CopyDocumentToFile method, you have more control over output path in that.

@vknow360

Thank you very much for your answer.
I adjusted my blocks accordingly and it works perfectly.

A great extension that helps me to overwrite and copy files not created by the app. Thanks again.

Frank

1 Like

Awesome!

How can I download this extension? Okay, I found the link. I downloaded the extension.

After reading this specific post/comment, I got a doubt. Can we open a text file from somewhere in the phone memory and 1) read it 2) Process it using other blocks (eg, reading base64 text and processing it using other blocks to get back the image file) 2) Update the text (means adding/editing the file) and 3) Store the updated text in ASD?

Hi Sunny

Would it be useful to include your filepath from contenturi block in the SAF extension?

3 Likes

Why SAF extension is giving DIFFICULTY IMPRESSION and feelings and other extensions are easy to use? How a newbie can simply use this extension like any other extension? Why there are no youtube videos that explain this extension.

How a newbie can easily understand this extension like any other extension?

Why, only technical words are used in the extension blocks instead of the words that are understandable by any common man or newbies?

Extension-related questions should be posted in the topic for that extension.

1 Like

@S.V_Arul_Shiju

Read this entire topic, and the links provided. Try out some of the examples, then maybe you will learn and understand how SAF works.

If you have a specific issue, then post your relevant blocks and explain the problem.

It is a complicated subject, necessitating a complex solution, and wording is there to avoid confusion with existing terms used elsewhere in AI2.

You may also want to research the subject; search the web for "android storage access framework" to learn more...

1 Like

Can anyone make youtube videos about this extension in a way that any newbies can use it without spending too much time to learn the techniqal side of the extension?

okay. I can understand. But, there must be shortcut to understand this extension easily. Okay, I shall search on Google as well.

Is it necessary to use SAF blocks in app to upload files using FilePicker and to put it in GoogleSheet?

No, it all depends where your files are stored and if your app created them as to how you can access them.

1 Like

Okay, leave me but think of upcoming newbies. It will be good if there is a precise article/tutorial-post in the below format.

TO GET BLOCKS TO LOAD FILES - CLICK THIS LINK.

TO GET BLOCKS TO DO XXXXXXX - CLICK THIS LINK.

TO GET BLOCKS TO DO YYYYYYYY - CLICK THIS LINK

TO GET BLOCKS TO DO ZZZZZZZZ - CLICK THIS LINK,

etc. etc.

If you or mit ai2 team provide precise blocks in the above format (in links), then new users don't need to understand what the SAF is, they simple use the right blocks in their project.

1 Like

it is important users understand what they are doing, and why

1 Like