Problems with write on file

Hello everybody.
I've read this topic

but I still cannot write on file in my smartphone.
I use this code:

When Button . TouchUp
Call File1 .AppendToFile
      text join "hello"
                    "world"
      FileName myFile.cvs
or
      FileName /myFile.csv
or
      FileName /myfolder/myFile.csv

Nothing is wirtten into myFile.csv wherever it is.
Please help me to go on.
Thanks

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

how did you set the FileScope?
Taifun

appinventor1

as I told, Roster_Volley.csv, /Roster_Volley.csv, /0-Mio/Roster_Volley.csv
I tried different FileName but nothing is wirtten.
Thanks

I've not set it.
What is it?
I drag the object File into the designer area, nothing else.
In a previous project I've had non problems to write into a file with the formula "/myFile.csv", now I use the same formula but it doesn't work.

This working fine in companion android 13

1 Like

I try.
In this way the file test.csv in in the folder...? Root of memory o root of card?
I've change the property in this way:
appinventor2
Then I'll say you if it's ok.
Thanks

ASD (App-Specific Directory)

Does for me!

Sorry, my fault.

The call.MakeFullPath says that the file would be here:
\storage\emulated\0\android\data\edu.mit.appinventor.aicompanion3\files\Roster_Volley.csv
but where is this path???
I don't find my file neither if I search for it with the phone attached to the PC, nor via the Android Files app

The folder Android/Data on my smartphone is empty.

what should I do to be able to save my file on the root of the main memory or even on the root of the sd card?

Connect your device via USB with your computer and you will see it:

Note: On Android 11+ the ASD is no longer visible on your device.

See also here:

THANKS !!!
Now I see the file!!!

1 Like