Name of downloaded file in notification

Hi, how do you ensure that when the download of one of the downloadable files starts, the name of the file appears in the download notification of the file just downloaded and not a string taken from the URL?

Thanks to anyone who will help me.

Potential ways to ensure:

  • After the 'download' attempt to load the file from your device; if the file loads as expected then the file downloaded
    ReadFrom(fileName) reads text from a file in storage. Prefix the fileName with / to read from a specific file on the SD card (for example, /myFile.txt will read the file /sdcard/myFile.txt).

  • After the 'download' attempt, check to see if the file is in the folder you downloaded it to.
    Use the Events AfterFileSaved(fileName) Event indicating that the contents of the file have been written.

or

ListDirectory(scope,directoryName) Get a list of files and directories in the given directory. If the downloaded file is in the directory, then it probably downloaded

or

perhaps test using Exists(scope,path) which tests whether the path exists in the given scope. Check to see whether the newly downloaded file is in the path.

All of these are potential ways to determine if a file is present on your device. There may be more ways.

Sorry, i don't understand..
Can you show me almost one of this way?

Here's a sample using multiple file download.

Sorry. Not without

  • a better description of what you are downloading (text file, sound file, image file etc.)
  • where you download the file from (Google Drive, a Web site , etc)
  • knowing what kind of notification is involved (a simple App Inventor Notification; notification from a download library etc.)
  • knowing how you download (using File component or Web component or what)
  • knowing where on your device you are downloading (Downloads folder, app's ASD, another shared folder etc.)

The examples already provided assume using the File component.

Simply, you need to provide a more detailed explanation of what you are doing and what you expect to happen.

In the Status bar? If so, that's not possible as far as I know. Only symbols / icons can be displayed there.

But you can get this (using my DownloadToASD and a Notification extension:

1 Like

È molto semplice. Quando si scarica un file, nella notifica di download dovrebbe apparire il nome del file mentre sta scaricando invece che una stringa.

Ad esempio, sto scaricando file mycardiofitv1_apk, dovrebbe apparire "mycardiofitv_1.apk sta scaricando, non una stringa che per l'utente medio è priva di significato.

Mi è stato già mostrato che posso inserire il nome di un file, però il problema si presenta quando implementerò più file: non tutti i file si chiamano mycardiofit_v1.apk.

Scarico il file da Google drive, attraverso il mio sito web

Recentemente ho scoperto questo strumento per creare app, sembra molto bello però non capisco nulla di questo mondo. Per favore, mostrami i blocchi, solo così potrò capire

Ti ho scritto nella mia lingua per farmi capire meglio. Use Google translate of you don't understand me. Thank you

Show me blocks please.