How to read the file from ASD folder

We are making an App in Kodular which should essentially do the following:

  1. Download a .txt File from an internal FTP server.
  2. Extract information from the downloaded file and send that information over Bluetooth serial
    We are able to achieve the 1st step and are able to get the file in the ASD folder. (Using TaifunFTP extension)
    However, in the step two we are not able to read the file from ASD folder, for any further processing. Such as getting the contents of the txt file and preparing a list out of its contents. All we get is an Error 2101. Please see the attached “Error Screenshot” and “Code Block Screenshot”.
    We are on Kodular Fenix 1.5.2. We are checking the app on Android 8, 9 and 10 with the same error. Only in case of Android 8, if we do not use ASD (use my own specific directory instead) everything works well, File gets downloaded from the FTP server and we are able to access it and use it for further processing. How do we make it work using ASD so that we are able to run it on all Android Versions such as 9, 10 or 11?

We will be grateful if someone could help us resolve this.


A slash (/) is missing here:

grafik

1 Like

Yes you should recheck the path
Or if you need the path easily then there is a application available on playstore

:question:

THE APP

Please do not spam community with irrelevant answers

1 Like

i put slash but same error

Screenshot 2022-02-25 180056

On Android ≥ 10:

On Android < 10:

Note: The File component uses a relative path (to save / read text files).

where should I get this block
(call GetASD1 .AppSpecificDirectory)

Thanks for helping me get the materials I needed.
:slightly_smiling_face:

1 Like

label1 text
contain what …?
its just label or indicating other block

If not mistaken from your code above I believe you are using Text_Box1.Text, so try with that

this what, I tried.
it giving me same error.

Use an if then statement if api level greater or equal to 29 read from …else read from …

In order to get api level use Device utilities or Get the API Level of the device - Extensions - MIT App Inventor Community

image

I tried this and its work with android version 9 .
but android version greater than 10 give me same error.

1 Like

Do what @dora_paz has shown in post #18.

1 Like

what about device_utilities1 block

which extension :thinking: