SAF: App Inventor implementation of Storage Access Framework

Try setting initialDir to content://com.android.externalstorage.documents/document/primary%3AMyFolder%2F

When you choose a dir with SAF Picker you will find tree in place of document.

1 Like

I tried with this block, it runs well, but how can I select the file ?

By clicking on it. (How else?) :wink:

How can I get the selected file uristring ? With OpenDocumentTree block I get the uristring of selected folder, not the uristring of selected file-

I know the folder, I know the filename , is it possible to open it with only one pick ?

It is possible and a work of adding just one line. Its implementation will take few days.

OK, thank you, I realized that using OpenDocumentTree block and clicking as attached you can view the file content.

You can try this beta version:
com.sunny.saf.aix (31.4 KB)
image

1 Like

OK, it runs well, thank you for your help.

Can you explain me the difference betwen type and extraMimeTypes ? can I use them for showing my desired file only ?

I mean all filenames starting with P

Then you have to list all files first and check then which of them start with "P".

I need to pick file or folder for opening, after picking I get automatically write/read permissions, why there are permission blocks ? When I need to use them ?

grafik

Is there a reason why this is not available in your latest extension version? @vknow360

Sorry, I forgot to add that method.
v1.2beta :
com.sunny.saf.aix (33.4 KB)

1 Like

:+1:

Firstly, why is the file in the Download folder? Does it have to be downloaded from the cloud? If so, you can download it directly to the App's ASD folder:

However, Download is an Android shared folder, you do not need SAF to access it.