Help With Save File

Does all this look right? I'm trying to incorporate the creation of a directory for my save files to go into.

1 Like

what about testing this yourself?

btw. if you are using the canvas, you do not have to first create a directory, the Canvas.SaveAs method is able to create the directory in case it does not exist it will be created automatically, see also App Inventor Code Snippets | Pura Vida Apps

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Ok thank you.

I am actually trying to get the pictures to show up in my gallery. They don't unless I restart the phone... Is this just because it is the companion saving the files and making the directory or will this happen once I build it and install it?

you might want to use the GalleryRefresh method from the tools extension

Taifun

See also here:

Grazie, Ma in appinventor sembra non funzionare, non viene caricato

how is this related to this thread?
please elaborate, see also

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

hope someone help me, how to download file from url(cloudinary) and save it into memory, so it can be seen in gallery, Previously I tried using several methods such as using the file component, then using the web viewer, but it still failed

You do not give the file a name (Responsefilename) so the web component generates one for you. The file will be saved in your ASD.

You do not show your url to download either which makes it difficult to check that you are authenticating with cloudinary correctly....

then I give the file a name

Then the companion give this result :

but no files are downloaded, I use android 13 for tester

image

If the download works, look in your ASD:
/storage/emulated/0/Android/data/<packageName>/files/handbag.jpg

to see the files in that directory, it doesn't seem to work, in newer android version, i will try to check the downloaded file in my dekstop

You can check if file exists with File component.

image
yes, the file is downloaded
another question, how to place the file to the shared folder for example /storage/emulated/0/Pictures/handbag.jpg
then it can be seen in the gallery,

Use File component to move the file , and TaifunTools extension to refresh gallery.

Okay thankyou @Kevinkun i'll try

Use the TaifunFile or FileTools extension to avoid storage permissions (WRITE) on Android 11+.
Otherwise there are likely to be WRITE permission issues (after the APK / AAB is built).

1 Like

thank you @Anke , I have successfully downloaded and moved to a shared folder, but the download push notification is not displayed,
how do I display a notification that a file/image has been downloaded, like this :