I have created a folder, where I save a text file the file is uploaded regularly.
I searched for the folder and file, the path is as follows:
internal memory / Android / data / appinventor.ai_angelo348.geodata / file / geodata
But if I write this path to share the file with the sharing component, pressing the button, it leads me to the download folder (which is not needed), of my device, and only for one time, the second time it no longer works. What is the exact path I need to enter?
In addition to the aforementioned path, I have tried three other different paths as per the attachments, but all with negative existence.
I also tried, noticing the error (/geodata/data.txt) in all three paths, with only (/ geodata /), but nothing to do.
In fact, the blocks do exactly like this, if the file does not exist, message try restarting the gelocalization.
If the file exists: Send it
But unfortunately as I described, the file exists and the contents are displayed in the texbox
But when I want to send it the path of the folder (Geodata), it is not found, because I don't know which path to give it.
this is why I gave you the link to @Anke's example...
let me suggest you to study the example and adjust your app accordingly...
and if you got stuck, then post an updated screenshot of your relevant blocks...
I did everything as per the extension images, but it does nothing but save the file, in the path where my blocks, the ones I posted to you, saved it, without using any extension.
Furthermore, to obtain the same result obtained with two extensions and all the code that I had to compile by copying it from the image, only the "Save File" block of the "file" component of app inventor 2 would have been enough, which I enclose hoping that it also serves others.
This block creates the folder and the file at the same time without dozens of blocks and extensions.
So I haven't solved the problem, in fact whoever created the blocks you suggested has inserted the warning in the "Sharing" block:
(you cannot share a text file from private)
Because he knew that the file would be saved in the private directory, where the sharing component could not access.
I tried to give a different path, but it keeps saving the file in the private folder.
In short, I have to create a folder in the main root and not in the path "/Android/data/appinventor.ai_angelod348.Sharing/files/Geodata/file.txt" and that file I must be able to share using the "Sharing" component
Maybe try it too.
Maybe I didn't quite understand the use of the 2 extensions.
I am attaching the .aia file.file_e_directory.aia (14.0 KB)