World is wide and there are so many powers!!!
I am thankful to you every day.
I want to include (attach, not appendtofile) the txt files inside the app.
For example,
The “folder1” has 3 txt files(1.txt, 2.txt, 3.txt).
The “folder2” also has 3 txt files(1.txt, 2.txt, 3.txt).
The “folder3” also has 3 txt files(1.txt, 2.txt, 3.txt).
Each folder has the txt files of same name but their contents are different.
All txt files have been made already and I want that users can’t see them.
How can I include them inside the app?
And how do I write the path when I open them?
Yes.
When I put the txt files under assets folder, it is Ok.
When I make a sub-folder under assets folder, and I put the txt files under sub-folders, it is not Ok.
P.S. In above sentence, “under” is correct, or “inside” is correct?
I just wonder as a Korean having poor English.
It is too difficult to use prepositions.
It can be the way to put a prefix to filename.
Then is there any restriction to put files in assets folder, for example; quantity, type and size of files?
The main AI2 server can produce apk files of no more than 10mb (an empty apk = 3.5mb)
The code ai2 server can produce larger apks
How many depends on what is manageable and practical for you given they are all in the same folder.
A couple of hundred maybe, but not thousands - assets is the wrong place for them.
You can also create an application specific directory once the app has loaded, and download files from an online source you have setup (e.g. file server / google drive). This directory also cannot be seen by the app user on their device, outside of the app.
I have 120 txt files, each file size is under 30kB.
30kB * 120 < 4MB
Each txt file has 100 lists(the length of file is 100)
Each list has a mp3 file matched it. And the size of each mp3 file is about 40kB.
40kB * 12,000 < 500MB
It would be good using the assets folder to save txt files, and a “specific directory” to save mp3 files.
Then please teach me how to manage to make a “specific directory”, and how to describe the path when I play mp3 files.
You should be OK with your text files as assets, but as you show, your mp3 files would need to be downloaded on first use (or as needed as they are not that big). You should decide whether they “have” to be on the app (big download on first use), or whether you can store them somewhere online for use as and when they are needed - or somewhere in between.