Parsing HTML file from SDCard

I change the URL to /storage/emulated/0/LMS/index.html and permission error is again started to appear! Also, the webviewer error is FILE NOT FOUND.

Getting weirder :slight_smile:

You probably told yourself that this would not work!

If you use Taifun's File extension, it has a block to show you the available storage directories, which you can then use in your file path (the external sdcards can have a different address on each device you use)

I used Taifun's plugin. It does list /storage/emulated/0/ as a valid directory; however the app does not engage sdcard on this path (I assume it is symlink to internal memory it seems).

is the "internal" virtual sdcard on the device. It is not the one you want. Did the block not show any other available storage directories?

Well yes. The other directory name was same which I am trying to avoid, i.e. /storage/0000-0000/abcdef

However, I think this trick (image below) is still better than absolute hard-coding the above path, as I assume that the function AvailableStorageDirectories will always list external sdcard path first:

Connect the device to Companion, make a right mouse click on this block "Do it" and post the result:

... and also on this block:

For some weird reason, my 'DO IT' item on right-click are disabled... I tried refreshing the app too, doesn't work.

The APK is working though.

Obviously, it's not connects with Companion. As I said, connect with Companion.

grafik

Ohh my bad... I came back to companion after many years, literally! Making stupid mistakes... :slight_smile:

Here it is:

Here I am just hoping (and praying) that the external sdcard address always remains in the first index, else the logic crashes. Don't want to go more complex of parsing the whole list and checking for an error for switching to next...

This path exists on all Android versions:

/storage/emulated/0/

So I should always pick the path !equal to this? Would that be the correct logic?

We could have abbreviated this significantly if you post the AIA as I suggested.

This is the path to your removable (micro) SD card (in the external storage).
Not every device has such an removable SD card.

A post was split to a new topic: Trying to read a text file(txt) from my sd card