Load HTML from File.DirRootExternal

Rusty

Well-Known Member
Licensed User
Longtime User
I need to load HTML "text" from a file stored on File.DirRootExternal.
I've successfully loaded from Asset using:
B4X:
WebView1.LoadUrl("file:///android_asset/html.htm")
But I don't know the proper designation for "file:///android_external..."
Any suggestions will be welcomed.
Thanks,
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks NJDude,
Originally, this is what I did. Unfortunately, loadhtml does not resolve all the "special characters" that are embedded within the html text.
When you load this html with this method, you see a lot of black diamonds with question marks embedded.
If I load using the LoadURL(... method, it works perfectly, only I need to be able to load the file from /mnt/sdcard/?? folder instead of dirassets.
Thanks for the suggestion though.
Rusty
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
I found this post:
HTML:
http://www.b4x.com/forum/basic4android-updates-questions/18835-where-files-stored-phone.html#post108202
that explained.
I was making it too difficult and thought there was some special designation for accessing a file.
it was as simple as:
B4X:
WebView1.LoadUrl("file://" & file.dirrootexternal & "/html.htm")
works fine.
Thanks for your suggetion!
 
Upvote 0
Top