Storage Permissions (READ / WRITE
) and DefaultFileScope
The DefaultFileScope
(AI2, Kodular: DefaultFile
) property in the Designer doesn’t convince me at all. I consider this to be dispensable / superfluous (not to say: confusing).
(Unlike AI2, this does not declare any permissions in the Manifest if
DefaultFile
is set toLegacy
.)
Why shouldn’t the storage permissions be declared like this (on all Android versions):
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
or this (since AI2 & Kodular decided to declare
requestLegacyExternalStorage=true
in the Manifest, so it continues to work on Android 10):<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
I have already asked this question on the AI2 forum many times and have not yet received an answer.
Explanation
Since storage permissions are requested since API 23 (Android 6) at runtime, it should not be a problem / disadvantage at all to always declare them in the Manifest.Only on Android < 6, storage permissions (
READ / WRITE
) are requested and granted at install time to be able to install an app.You can remove them from the Manifest if the app doesn’t need them and if you don’t want users to have to grant them. However, this was also the case before.
So I would like to hear a single argument against my proposal.
The huge advantage, however, would be that it would simplify a lot and prevent countless permission bugs and issues. I have pointed this out in countless topics and posts in the AI2 forum.