MFile - a modified version of Sunny's EFile extension - Shared folders - storage permissions - Android 11+

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 (/Documents or /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 Delete & FileExists & API level methods are needed.

The Delete method exists with the File component, but incorrectly requests storage permissions on Android 11+. This bug does not exist with this extension.

de.bodymindpower.MFile.aix (21.6 KB)

grafik

Try this app. It saves a text file in the Shared folder /Documents. It should work without storage permissions on Android 11+ using the MFile extension.
If you try do use the File component (Checkbox disabled), you will get a permission error (“Error 908: The permission WRITE_EXTERNAL_STORAGE has been denied. Please enable …”). In order to work with the File component you MUST declare WRITE permission in the Manifest manually.
MFile_saveRead_Documents.apk (4.8 MB)
Btw, this APK was build on the Beta server and targets SDK 31.

Blocks

1 Like