I love you, my application can save files normally
I am really not a fan of the File
component for these reasons:
- The really disturbing thing is the constant alternation between relative and absolute path.
- Copying from the assets does not work
- Permissions are also requested for the ASD (but this applies to many components, but I’m sure this will be fixed when Kodular targets Android 11, Aug 2021).
Here are all blocks, where you can see that for the SaveFile
method a relative path is needed, but for the Copy
method you must set an absolute path.
I hope that this (and the other points) will be adjusted / fixed with the next Kodular update.
→ @Kodular
Great! Is there a way to test it?
Maybe on the Beta
server, but unfortunately the build server doesn’t seem to be working there at the moment.
I will push the changes to beta over the weekend
Beta server has been updated
Changelog:
- Fixed File Copy function doesn’t accept asset path
- Fixed File Copy function doesn’t accept relative file names
- Fixed File Exists function doesn’t work for assets
Sorry, but the Beta
server still does not work, neither with Companion nor can the APK be built.
What about the 3rd point:
I suspect this will stay that way for now and will be changed after Kodular targets Android 11. Am I right?
The beta server targets Android 11 currently. The permissions are asked for the component. We need to implement conditional permissions from App Inventor in order to control the unnecessary permissions. Also, currently, the runtime permissions are requested for the whole function, i.e, the function arguments such as file names are not checked before requesting permissions. This needs to be fixed.
I know, of course I didn’t mean the Beta server.
So to avoid permissions in the meantime, we can use the EFile
extension from @vknow360 .
Yes, but there is another permission issue that needs to be fixed (→ read from assets):
Tested on Beta
server (with the compiled app / APK):
After denying permissions:
… and after granting permission:
As I said, the .PermissionGranted
event is not triggered. So I have to click the button again to get “true” at Label3.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.