Download Multiple Files with subfolders

Do it once and do it neatly according to the art and not according to your ideas. In a few months you will find your application not working and waste a week fixing it again. If you already have files downloaded to ASD, why do you copy them to another directory? Leave them in the ASD and load them into the app from ASD.

Thats true, do you have any approach for me how to realise this?

Where is the problem? Since the files have already been downloaded to the ASD, you can access them directly without having to copy them to the external memory beforehand. Btw, no permissions should be required for this.

1 Like

But the ASD directory is not showing with the internal file explorer and I need an explorer as the directory has many folders and subfolders

Yes, but how? Is there any explorer extension or something?

How do you load them into the application from the folder where you copy the files?

Unless your application does not open these files, but only downloads them to memory, and the user has to open them himself :flushed:?

There are a lot of file managers, which can also access the ASD:

https://www.reddit.com/r/Android/comments/j3zgmm/managing_files_in_the_androiddata_folder_on/

Why, for what purpose? Why does the user need to know the file / directory structure?

I guess that's why:

When the files are copied to another directory, outside from ASD, the folders can all be opened with the device explorer.

E.g. with a Google Pixel Device with the build in "files" explorer.
You can NOT browse with the build in explorer inside the ASD folder (Android/data.... is empty)

Screenshot_1

Then I would not need an app for it....
The Idea behind this app is, that they do not need a laptop or PC e.g. when they are not at home

Of course they have to browse through the folders, wehen they search for something (e.g. a manual they need)

Perhaps I should further explain:

There are, lets say 700 pdf files (e.g. recipes).
These recipes are devided into many different recipes in difefrent folders:

meat/chicken
meat/cow
meat/chicken/oven
meat/chicken/grill

and so on....

Thats the reason why the user must be able to navigate through the folders.

When there is a new recipe, it will be added to the csv file on the server, so next time when a user updates his files, this new recipe will be downloaded and added,

Instead of making an app to download files, provide users with a link to the files. They will download files to the folder they want and view them.

All the time we thought that your app is the viewer for these pdf files and you open them with the app. I think making users search directories with any file manager is tedious for users. Your app should be able to search for a suitable pdf file and open it automatically. Unfortunately, what you want to do will not be possible if your users have android 11. Of course, you can grant authorizations for writing to external memory, but I don't know if google will allow it for your type of app.

Yes, that is also a possibility in the app, but what if the user has not network connection or something?
Thats the reason why the files have to be downloaded, to use this app online AND offline!

This is not what I mean. Simply insert a link to your app that can be opened in an external browser. User click link, and the files will be downloaded to the download folder where it will be accessed from each file manager.

If I were you, I would create a list structure. You would display these lists in a ListView component. Clicking on a given item on the list would open the appropriate PDF. You would not need this whole directory structure then, because the user would not search for files in the phone's memory, but would look for them in your app and open with the app. The files could then be in the ASD.

Yes, but if there is no connection (can happen where i live), they can not browse and download at all :wink:

Thats exactly what is also my intension, but HOW do i get a list structure of all files inside all folders / subfolders in the ASD?

You don't need to get the directory structure. Get rid of directories, all files in one directory. Then use only the filenames in your app. If the user wants to view e.g. the ABS system diagram in an Audi car, first click on the Audi position in the brand list. Then a list of systems in the car is shown, clicks on the ABS system. Your app knows the name of the file that contains the ABS diagram for Audi and opens it.

Faq regarding the lists.

Especially this:

Nobody said that creating a good app even in AI2 is easy. Everything takes a lot of study and work.

Which was my point at the beginning of this discussion.

I don't see a huge issue with creating a local directory structure. It can provide for more granularity when using file extensions to browse for files (these blocks for working with image files only, for demo purposes):

image

image

There is no purpose in that - it is more complex and thus prone to error. The App needs to deliver the granularity to the User for ease of selection (Γ la Patryk's description) - the User is not browsing any directories, he/she is selecting subjects from Lists. The code for loading the files is straightforward when there is only the one directory to read from. KISS :grin:

It is fun searching through a list of 700+ files for the right one :wink:

For that reason i am using actually the built in device explorer....
If you know what you are searching for it takes 10 seconds to find the correct document :wink:

Take a few screenshots of your device that show what it looks like in the devise explorer (if the PDFs are stored in the external storage and not in the ASD), so that we can get an insight into the file / directory structure.

And where should the problem be to represent this files / directory structure in a list? (Regardless of whether all files are in one folder or in different folders or sub-folders).