2017년 4월 14일 금요일

can't share a saved document


Hello my name is Arjen and i am new in this forum.
My problem is that I am not able to share a saved file from my Samsung Galaxy phone and/or SD-card
As soon as I try to share a test.txt, I get an error message:
Error 2001: The File file://test.txt could not been found on your device. For some reason I cant get the proper path. (have tested also file:///mnt/sdcard/test.txt gives the same error)
The test.txt file is directly stored on the SD-card and not in any directory, is I store it internally on the phone, same problem and error message.
What is going wrong?
--
You cannot read a file on the SD card, only on the internat SD card. Did you look with a file browser what the real filename is?
I assume you read the documentation? Cheers, Ghica.


ReadFrom(text fileName)
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 the filename with // (two slashes). If a filename 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.

--

hello Ghica, thanks for quick response.

Yes i read all the documents and i am storing the file after creation in the internal SD-card in my phone 

--
I have seen that the name in the share file is not correct, even after changing it io text.txt still same problem

--
you have to use the full path for the Sharing component like this file:///mnt/sdcard/text.txt

--
I have to apologias for not responding on your messages. I was working outside and had no internet connection.
Thanks for your input, I can store now in my internal memory of my telephone. Storing on the SDcard is for some reason not possible.
If I use the command “/text.txt” it is stored in the root and if I use “text.txt” it is stored in the app inventor directory.
the share problem is also solved!
--

댓글 없음:

댓글 쓰기