In the designer for Screen there is a section to set the Default FileScope (there is not a corresponding property block in Screen to set this in blocks?)
In the designer for File, there is also a section to set the Default Filescope - with a corresponding property block in the editor
Are these two inter-related, or entirely separate things? If I set one does it set the other, or do I also need to set the other as well?
For example, I set the Filescope to Legacy in Screen in the designer. Is the Filescope now set to Legacy if I use the File component ? Similalry, if i set the Filescope to App using the File component block, does this set the Screen Filescope to App ?
As per usual, confused
Also. doesn't seem to be possible to set File1.Scope to a label ?
DefaultFileScope (only) determines which storage permissions are declared in the Manifest.
If DefaultFileScope is set to Legacy, then (and only then) READandWRITE 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 by this property "DefaultFileScope" in the designer. I consider this to be dispensable / superfluous (not to say: confusing).
Why shouldn't the storage permissions be declared like this (on all Android versions):
I have already asked this question many times and have not yet received an answer.
The function of FileScope is to determine the respective path of the File component.
And again this has nothing to do with DefaultFileScope (in the designer):
Note: I think this is interesting for everyone too, not just power users, so it should be available on the public forum. Maybe you want to move it there.
The DefaultFileScope controls all of the other components in the app. We thought this would be more convenient for developers than introducing a scope property on every single component that touches the file system. Additionally, extensions can be hooked into the same system if the appropriate APIs are used so that if we need to make changes extensions will automatically be compatible with future versions. The File component was an exception because its the one component intended to manipulate files in the file system and therefore needs the ability to reference different scopes at different points during app execution, such as to migrate data from older locations in the file system to newer locations allowed by the Android 10+ changes.
If you specify an absolute path it will be honored. This is necessary for backward compatibility. However, people will bump up into Android file system constraints if they make use of absolute paths. The Android documentation discourages this because there's no guarantee that a mounted file system will get mapped to the exact same mount point in future versions. See the caution note on this page.
I now understand (through your words and images, and through my own investigations and tests) that the DefaultFileScope set in the designer remains static, and cannot be changed elsewhere in the app - companion or compiled, whatever you set here stays set. However for the File component, it is possible to change the FileScope for only file component operations.
Apparently not, as I have shown with two examples. So we should investigate which components that touch the file system are actually controlled by DefaultFileScope.
And as I already said, this is relevant for all users (not only PUs).@TIMAI2