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 ). To read assets packaged with an application (also works for the Companion) start the fileName with // (two slashes). If a fileName does not start with a slash, it will be read from the application’s private storage (for packaged apps) and from /sdcard/AppInventor/data for the Companion.
just use the SaveFile method to save it there
but probably you like to upload your file in the Media section into your project (assets) and read it from there? just use //teste.txt then
When I connect my phone to my computer, there is a folder called Android. Imagine that I wanted to read a file inside "Android/data/packageName/files"...what do I need to put in the file name in order for it to be read from that folder?
Hi, I'm developing a Contacts App, that reads the contacts from a CSV file.
But I don't want to redistribute the App every time a new contact is added to the list, so the contacts file must be a in a place that's accessible both by the App and by a PC with a USB connection to the phone.
That being said, what do I need to enter on the file name in order to read if from /storage/emulated/0/Android/data/packageName/files/
?
On Android 10+ (to save / read a text file with the File component) the path is: /fileName.txt
This path is redirected to the ASD for devices with Android 10+.
and on Android < 10 the path to the ASD (for the File component) is a relative path: /Android/data/packageName/files/fileName.txt
But nothing worked....the file names are always appended to the ASD. For instance, if the file name is
/storage/emulated/0/Download/test.txt
it will try to save on
/storage/emulated/0/Android/data/appname//storage/emulated/0/Download/test.txt
Maybe. If you expose your blocks or post an aia example of your Project, someone can evaluate what you are doing. This discussion appears to be going in circles. Post #13 indicates this issue is solved. That isn't corrrect?