ResultUri gets number of file instead file name

Hi,
I have tried the example of Taifum Picking files from the SD Card with App Inventor, but I retrieve a string with a number instead the file name; ex: content://media/external/file/11167
Any help?
Thanks

this is a content uri
you can convert that into a filename by using the GetFilename method from the file extension

Taifun


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

ok thanks I worked!


Hi again,
The file, could not be found, when I try to read it: /storage/emulated/0/file.csv
??

according to the documentation the file component expects a relative path, which is in your case /file.csv
http://ai2.appinventor.mit.edu/reference/components/storage.html#File

ReadFrom( fileName )

Reads text from a file in storage. Prefix the filename with / to read from a specific file on the SD card. for instance /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 applications private storage (for packaged apps) and from /sdcard/AppInventor/data for the Companion.

Taifun

Thanks Taifun
But the goal is get the file from download directory
I have problems too with the Huawei explorer file app: the files at download folder are shown but disabled and it is not posible to get them.
Is another alternative?

as already said, use the relative path to the file, which then is /Download/yourFilename.txt

Taifun

2 posts were split to a new topic: How to convert a csv file into a list?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.