Copy file picked from activity starter to ASD

i want to copy html files that user picked using activity starter to asd so next time app can load it directly without user picking again
i tried to use the conent uri to file path block on both sunny’s filetool and taifunfiles both didnt work
is there any way to do it without extension or pick file path directly without read permission

Use SAF to pick file and then using CopyDocumentToASD block you can copy picked document to asd.

This block:


thanks i have copyed my files sucessfully although i cant find the block mentioned i used a workaround

can i ask a followup how can i write a file to download folder it gives error cant use this folder “to protect their privacy”

You can’t.

Though you can download files to that folder using Downloader extensions.

i am going to write a copy of tinydb to downloads not trying to actually download anything
im on android 12 i believe its still possible

With SAF you might be able to copy a file from asd to Download dir but you can’t write directly in Download dir.

You should use File component for writing file.

other app is able to use saf to write to downloads like this

if it didnt work ill just go ahead and get the manage all file permission no big deal

I was talking about SAF extension. It still doesn’t have block to invoke ACTION_CREATE_DOCUMENT.
Obviously it is possible to create a document in Download dir with Storage Access Framework of Android.

I’ll add the block when I get some time.

ok ill try to use file extension first

i have sucessfully done it with activity starter and afterward use saf write to file block to fill the data


do you know what should i set the minimum api because older version dont have saf i believe

SAF was introduced in Api 19.

If possible post your solution blocks on SAF topic in App Inventor community. It’ll be surely helpful to other developers.

Which means, you will not be able to publish your app in Google Play anymore

Where does the file come from, you like to store in /Download?

What about using the file component or any of the file extensions?


Looks like he is not using MANAGE_ALL_FILES_ACCESS intent now.

Ok, yes… that screenshot is a mess…

i will post a better one to saf thread later
but problem is now i cant get the default file name
which should be passed in extra but it didnt work
its still useable just a bit more annoying for the user

Try adding an extra value to Intent.
Key: android.intent.extra.TITLE

it worked and ive posted better screenshot of blocks