To get the required permissions. These are indeed the correct permissions on Android < 11, but on Android 11 these are the incorrect permissions because
- on Android 11+ there is no longer
WRITE permission and
both permissions (
WRITE) are not needed at all (for the
Since AI2 decided to declare
requestLegacyExternalStorage=true in the Manifest (which is only ignored on Android 11+), the storage permissions should be declared basically (always) in all Scopes (DefaultFileScope and FileScope) this way:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
DefaultFileScope and the
FileScope are both set to App, files are saved in the ASD with the File component. But on Android < 4.4 (< API 19, KitKat)
WRITE permissions are required.
In order for these permissions to both be declared in the Manifest, the default settings of the
File component must be changed and both permissions must be enabled in the designer. So there is no (recognizable) reason why this option (ReadPermission, WritePermission) exists in the
File component at all. Because both permissions are always required on Android < 4.4.
But if you then want to copy/move a file from the ASD to one of the Shared folders,
WRITE permission is incorrectly requested even on Android 11+. This permission is
- no longer available on Android 11+ and
- is not required on Android 11+.
Can anyone make this even clearer? I wouldn't know how!
When even PUs (and apparently even the MIT team ) seem to have trouble understanding all this scope stuff, how will it be with the others?