EFile extension works with Companion but not with the compiled app

Hi!
I am creating an app where I need to download a file with some data. The download works fine when I test it using AI Companion, but when I download the APK of the app the download of this file doesn't work anymore.
Why does this happen?
Thanks in advance!!!

These are my blocks

you can't store files to arbitrary directories anymore...
you have to store to shared storage like /Download EDIT: or ASD
see also the overview

Taifun

1 Like
  1. What DefaultFileScope did you set in the Designer?
    grafik

  2. Which Android version are you testing on?

  3. It should work on all Android versions ≥ 4.4 (API level 19, KitKat) without storage permissions.

See also here:

In this example I save a text file in the Shared folder /Download with the EFile extension and the File component. This works without storage permissions on Android 11+ using the EFile extension (but not with the File component).

This is expressed in a misleading way, I suppose. I think you mean the following:

I'm building an app that stores text/data in a text file. This works with Companion but not with the compiled app (APK). So make it more precise and change the topic accordingly.

the DefaultFileScope is set in App and I am using android 11 to test it.
thanks! i will read the posts you have shown me.

Yes, that's what I mean. Sorry I am new to this topic and English is not my first language.

There seems to be a bug with the EFile extension when using a relative path to save the text file (on Android < 10):

So try with the absolute path:

1 Like

... and do the same for devices with Android 10 and 11+, like this:

I changed the topic.

This is all you need and it works on all Android versions:

Note: storage permissions are only requested on Android below KitKat (API 19).

Or this

grafik

thank you! it worked!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.