UPDATE (Feb 28, 2022): To get rid of the annoying problem / bug "Error 908: The permission
WRITE_EXTERNAL_STORAGE
has been denied. Please ..." you MUST set
DefaultFileScope = Legacy
(Designer).
Here is versions of an extension, with which both storage permissions (READ & WRITE) are declared in the Manifest, independent of the components used (especially the File component).
It declares READ & WRITE on all Android versions (also incorrectly on Android 11+, but NOT with AI2 - for whatever reason. It does on Niotron, Kodular etc. This is harmless though, but is required for certain components that can save something to make it work (and then there is no "Error 908: ..." with Niotron having the same error on the file component)..
DeclareReadWrite.aix (4.7 KB)
So as long as the bugs related to the affected components are not fixed, you must set the
DefaultFileScope
toLegacy
to avoid the Error 908 on AI2. In all other cases (e.g. if you store / access something in the ASD) you can use this extension or you must use the File component and enable both permissions in the Designer.
...........................................................
Explanations:
Since on AI2 the minSdkVersion is 7 and not 19 (KitKat) as on Kodular, both permissions MUST be declared in the Manifest (at least up to maxSdkVersion = 18).However, such a declaration would only make sense if it was clear from the outset that only the ASD would be used as the storage (access) location.
Note:
Storage permissions are no longer required for the ASD from API 19 (Android 4.4, KitKat) onwards.