TaifunFile Extension can't read from sd card

I was using the taifunfile extension and wanted to scan mp3 files on my sd card. However, it seems like the extension can't read files from that certain directory. My internal storage is /storage/emulated/0 and my sd card seems to be /storage/0000-0000

So, I used the taifun.FileList component to search the sd card directory. First, I got no mp3 results from that directory so I made the component print out the results on a list. It literally gave me "/storage/emulated/0/storage/0000-0000".
It seems like the component just default prints /storage/emulated/0 in front of the directory I give.
Are there other good extensions that give me a list of files from external storages and let me read it?

  1. Use the extensions block : .AvailableStorageDirectories to get the location ?
  2. Use the absolute path to the external sdcard, e.g. file:///storage/0000-0000
    (from the extension documentation)

is wrong i think
use
/storage/extSdCard
or
file:///storage/extSdCard

Yes, if you don't specify root path then the extension will prefix a default path (which points to external storage).

1 Like

I don't why but it doesn't point to my external storage. It points to storage/emulated/0 which points to files in my phone. (I know this because it gives me mp3 files in the internal storage)

I did not set an empty path. I clearly set it up to storage/0000-0000 which is my directory for the sd-card on my LG phone. However, it searches for a directory called "storage/emulated/0/storage/0000-0000" which obviously is wrong. The extension searches "storage/emulated+directory I input" which makes it impossible for me to search files in my sd card directory.

I used most sdcard directories people recommended on other forums and topics. However, the problem is this: when I input a certain directory (let's say A) the extension searches for a directory called "storage/emulated/A". So, it just searches my default internal storage. I need it to search directory "A" instead of the unnecessary storage/emulated/~

  1. yes I did use that block to confirm that storage/0000-0000 is correct. The problem is the .FileList searches for files inside /storage/emulated/0 by default.
  2. THAT WORKED. THAT WORKEDDDD. Thank you.

Kindly have a look here:

Try this APK on your device:

https://drive.google.com/file/d/1PfV7svLsEwC9-bogVra5bpyUrU4mD1kX/view?usp=sharing

@Anke, problem already solved.....

well @HIFI_APPS , the path to an external (removable) sdcard is different from sdcard to sdcard
that path might be correct for your sdcard, but not for another one...

generally you can use the AvailableStorageDirectories method from the file extension to find out the correct path to your external (removable) sdcard

Taifun


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

1 Like

No, he has to use the .FileListAsync method to list all files, because the other method need at least 10-15 sec to get the mp3 files (in my case more than 700). In addition, it's not possible to append a second list at Screen.Initialize, if there are many files. Maybe that is working for a small amount of files.)

Fine is there any other path which is common to all mobile devices

no...
Taifun

1 Like

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