When I save a list to a file I cannot see it from my phone

Hi,

I have an app and I want to save the content of a list to a file. The code works fine, because if I connect the phone to the computer I can find the text file with the computer file explorer, but I cannot see it from the file explorer of my cell phone.
My cell phone is a Xiaomi MiA3 with Android One version 11. The app is installed in the cell phone, it is not executed with AICompanion.

I have read in a lot of posts that if you set the name of the file as "/filename.txt" it should be stored in the root of the SDcard. But what happens is that it is saved in the "Internal memory/android/data/.....Appname/Files"

How can I create in the Documents or in the Download folders?

Thank you for your help

Change your filescope for the File component to Shared. (if this doesn't work, try Legacy). You will also need to provide the shared directory to save to, e.g. /Documents/filename.txt

If the text file should also be read, it will only work on Android 13 and below, as READ_EXTERNAL_STORAGE permission is incorrectly requested even on Android 11 and 12. On Android 13+, this permission no longer exists, but is incorrectly requested by the File component.

So, if necessary, use my MFile extension for this.

Thank you, this has solved the problem. Now U can write it on Documents folder

Thank you very much. In this project I do not need to read the file, but I take note of your extension for future projects.