File component could not error

I love you, my application can save files normally

1 Like

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).
1 Like

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. :upside_down_face:

Blocks

I hope that this (and the other points) will be adjusted / fixed with the next Kodular update.
@Kodular

1 Like

#off-topic

What is the meaning of it? Really i don’t know about it

One from the Kodular team took care of the matter.
Thank you @pavi2410 !

2 Likes

Fixed that! Thank you very much @bodymindpower for reporting this bug :pray:

2 Likes

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

3 Likes

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

@bodymindpower

1 Like

Sorry, but the Beta server still does not work, neither with Companion nor can the APK be built.

That is something @Diego needs to fix

1 Like

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.

1 Like

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 .

2 Likes

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.