Try with the file name only.Ex. /File.txt
Same…hmm
Documentation:
Reads text from a file in storage. Prefix the
fileName
with/
to read from a specific file on the SD card (for example,/myFile.txt
will read the file/sdcard/myFile.txt
). To read assets packaged with an application (also works for the Companion) start thefileName
with//
(two slashes). If afileName
does not start with a slash, it will be read from the application’s private storage (for packaged apps) and from/sdcard/AppInventor/data
for the Companion.
I think you need to test as apk.And try:
/File2String/File.txt
I have already saw in kodular docs
Dont think so
Please try.And try also /File2String/File.txt
Tried…Not work
Did you tried /File2String/File.txt
Also does you file exist.Take card that it case senstive.Means that File and file aren’t the same.
Also try with the complete path:
/mnt/sdcard/File2String/File.txt
That really work with me.I’m not guessing!
Really???
Yes.Can you show me your blocks?Also did you asked for READ_EXTERNAL_STORAGE
The storage permission is already granted, can you give me any test AIA?
Ok.I will give you one.
Did you build or just test in the Companion? Either way, if I’m correct, Kodulars file component prepends /storage/emulated/0
to your file. Can you test just /File2String/File.txt
after creating the file for me?
@Mohamed_Tamer may have been correct by this post if you haven’t tried it yourself @Business_World.
Which is why I gave you credit for the original solution… because I don’t like when people mark others responses as a solution when I originally gave it to them, so I feel that others take it the same way as I do.
Try this:
The File component uses different paths (relative / absolute) for methods (blocks). In this case (.ReadFrom
) the relative path is needed.
See also here: