Here is a modified version of Sunny's
EFile extension, which added some methods that are needed (among others things) for testing purposes with Companion & AKP. Because if you try to save in one of the Shared folders (
/Download) first with Companion it is not possible to do this without deleting the saved text file before testing with the APK and vice versa (at least on Android 11+). So the
FileExists & API level methods are needed.
The Delete method exists with the
Filecomponent, but incorrectly requests storage permissions on Android 11+. This bug does not exist with this extension. In order not to be dependent on the
Filecomponent at all, the required storage permissions for Android < 11 (API < 30) can be declared with this extension DeclareReadWrite.aix in the Manifest.
MFile.aix (16.2 KB)
Version 2 (April 8, 2022):
de.bodymindpower.MFile.aix (21.6 KB)
Note: The first version seems to have conflicts with other specific extensions. In this case, use version 2 (compiled with
Try this app. It saves a text file in the Shared folder /Documents. It should work without storage permissions on Android 11+ using the
If you try do use the
Checkboxdisabled), you will get a permission error ("Error 908: The permission
WRITE_EXTERNAL_STORAGEhas been denied. Please enable ..."). In order to work with the File component you MUST set
Legacyin the Designer.
This is the only way to declare
WRITEpermission in the Manifest (even on Android 11+, which of course doesn't make any sense at all, but it is required to work with the File component).
As long as the bugs with the
Filecomponent are not fixed, I recommend using this extension (
MFile), at least on Android 11+.
But if you want to stick with the
Filecomponent, you MUST ALWAYS set
Legacy. Otherwise it will not work on Android 11+ or you MUST save in the