Import export text files to ASD and /Download

I am sharing this project with anyone who might benefit from it. Reading a TEXT file NOT CREATED by your app is even more difficult due to Android restrictions (even file managers don't have access to the ASD folder). This project solves the problem without using extensions. Tested successfully on Android versions 9 and 15. Upon first launch, it asks for access permissions. After granting them, launch your APP again and start exploring the folders, wherever you are, waiting for you to select a TEXT file to copy to ASD. After selecting, you will see a message on the screen. This need arises for those who have created databases and want to export and import TEXT files, even for BACKUP. Or if your archive is written in TINYDB, if you do not export it to TEXT, the data will be lost when you uninstall the APP. The EXPORT button saves your TEXT file in a /Download/exp folder. You will notice two different behaviors: if your Android is lower than 13, the name of the exported file will be the same as the initial one, otherwise the name will be something like msf%3A10000044844. You can rename the TEXT file which will not have suffered any data corruption. If you want to avoid this situation, install a File Manager like "CxFileExplorer" or "File Manager" by EKIA from the PlayStore and use one of these in the initial folder explorer phase.


copy_File_to_ASD.aia (9.2 KB)

New program block for your app: Added "direct selection from ASD and copy to /Download/exp/" function for quick file saving. These examples make it easier to implement in your app.


copy_File_to_ASD_v1_1.aia (10.2 KB)

This is all you need to copy a text file from the root dir of the external storage to /Documents, get full access to it, move it then to a subfolder /Download/testFiles/... and read it from there without any permission on Android 11+.

It works on all Android versions, but you must request WRITE permission on Android < 11.

1 Like