Here's my case: I have a CSV file created outside the App (w/ MSoft Excel) with the 10k most common words (to be used in a predictive text function of text input). The file is a 10k row by 14 column table with the 1,2,3...8 character fragments of each word and other word-specific data (very easy to create and manipulate in Excel). This CSV (i.e. Excel) file may receive updates down the road.
It is read only once (at Screen1.initialize) then a TinyDB is created (or updated if there are new words in the CSV file) and then it is loaded into a list where it is used by the rest of the App functions. New words added locally by the user are stored in the TinyDB and remain only there. The CSV file is read-only.
When connecting my Android 11 tablet via USB to my laptop, the main folder appears as an external drive called "Internal Shared Storage", with subfolders including /Download, all types of media and /Android/data/nameOfMyApp.
I can copy the CSV file into any of these folders and the App running in AI Companion can read it and everything works just fine, but, the compiled .apk comes back with "Error 2102: file can't be opened" regardless of where I place the CSV file.
I'm guessing the AI Companion has MANAGE_EXTERNAL_STORAGE permission?
If the folder is called "Internal Shared Storage", is it Internal or is it shared?
From the forum's Android Storage Basics
I can extrapolate that in my tablet, the path of the ASD is: Internal shared storage/Android/data/nameOfMyApp/files/
but, placing the CSV file there still generates Error 2102 in the compiled app.
Given this use case (read CSV file only once from an outside source), do you recommend to go SAF Extension, Web download, request `MANAGE_EXTERNAL_STORAGE, or some other option (all entail a learning curve so I'm trying to pick ONE).
I am in complete AWE at the speed, precision and effectiveness I get from the answers in this forum and particularly from you guys/gals. You make me feel like I have a personal support team!
The ASD with the compiled app is: /storage/emulated/0/Android/data/appinventor.ai_<yourEmail>.appName*/files/
In my case for example: /storage/emulated/0/Android/data/appinventor.ai_bodymindpower.Relax/files/
So you should not hard-code the ASD, but leave it to AI2 (File component or one of the many extensions for it). And if you want to manually copy the CSV file there, make sure you select the correct ASD.
(*) More precisely the projectName (Relax.aia in my case)