Android Question Path to DirInternal to load picture in html webpage

GERSON PINTO

Member
Licensed User
Hello
Inside my html page when I download It to assets directory the path to show picture is:
src="file:///android_asset/house.jpg"

What is the correct path if I download the webpage to DirInternal?
src="file:///????/house.jpg"
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Inside my html page when I download It to assets directory the path to show picture is:
src="file:///android_asset/house.jpg"
This is a mistake. Correct code is:
B4X:
 WebView1.LoadHtml($"<img src="${xui.FileUri(Dir, FileName)}"/>"$) 'xui is a global XUI object.
Replace Dir with File.DirAssets or File.DirInternal or any other folder.
 
Upvote 0
Top