The upcoming DefaultFileScope property in the Designer - some suggestions/hints

As we have heard from @pavi2410 here, the Designer Property DefaultFileScope is also to be introduced on Kodular, as is already the case on AI2.

On AI2 DefaultFileScope determines

  • which storage permissions are declared in the Manifest and
  • which Scope is used for components that can save something (eg Canvas, Camera etc).

If DefaultFileScope is set to Legacy, then (and only then) READ and WRITE permissions are declared in the Manifest (also on Android 11, which doesn’t make sense as it doesn’t exist there).

I am not convinced at all by this property DefaultFileScope in the designer. I consider this to be dispensable / superfluous (not to say: confusing).

1. 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 many many times and have not yet received an answer on the AI2 forum.

2. The Scope for components that can save something should be set the same way (see here) in my opinion as it is the case with the File component (except for components using an absolute path).

Doing this centrally via DefaultFileScope (as on AI2) causes this to not work for some components that use an absolute path.

:exclamation:This topic specifically addresses the Kodular team to advise them not to repeat the same mistakes / bugs that AI2 made and still hasn’t fixed.


I completely agreed with you.

And on top of that, it results in all components (except File) then being forced to use the same Scope, which definitely cannot be desirable.

So it may be intentional, for good reason, that one component should store something in the ASD and another in one of the Shared folders (like /Documents or /Pictures).

This would then no longer be possible.

1 Like