Both storage permissions are required on all Android versions. Unfortunately incorrectly even on Android 11+ (meaning it should work on Android 11+ without any storage permissions).
In order for both permissions to be declared in the Manifest on all Android version (even on Android 11+), → DefaultFileScopemust be set to → Legacy in the designer.
Note: WRITE permission is no longer avialable on Android 11, but is still wrongly needed to make it work on Android 11+ devices.
Check this app (especially on your Android 11+ devices). Download the aia, build the APK and install it: textFile_save.aia (2.7 KB)
Explanation: If this file "myTextFile.txt" has already been created by another app, it cannot be overwritten (on Android 11+). Therefore the file name has to be changed.
Thank you all. Taifun correctly identified that I was confused by the need for two apparently conflicting assignments of the Default File Scope and the read and write permissions and that the screen Default File Scope would have to be set to Legacy. I also didn't realise that this was the essential modification in Anke's app which resolves part of the question raised in this thread.
Hi Anke, Thank you for the App and the very clear explanation. I had acknowledged your identification of this problem earlier in this thread but didn't understand it correctly until I saw your explanation just now. I also mentioned earlier that the AI2 Shared File Scope allows an app to read, write and export files that it generates, but does not allow an external text media file to be read from the Download or Documents folders and generates the "Error 2102: The File Download/Filename.txt could not be opened". This is not corrected by setting the Screen Default File Scope to Legacy. My question is whether this is intended behaviour or a bug?
To access (read / write) non-media files, that are not created by the app itself, you must use the Storage Access Framework (SAF). See also here from my overview → Some basic on Android storage: