Android Question Loading an image from a webview

FHEBERT

Member
Licensed User
Longtime User
Hello,
How to load an image from the application directory ?

This example does not work
Exemple :
AdvancedWebView1.LoadHtml("<img src = 'file:///" & File.DirDefaultExternal & "/Chat/Me.png'</img>")
 

eurojam

Well-Known Member
Licensed User
Longtime User
it should be rather something like
B4X:
AdvancedWebView1.LoadHtml("<html><body background = 'file:///" & File.Combine(File.DirDefaultExternal) & "/Chat/Me.png'</body></html>")
not tested, just a suggestion...
 
Upvote 0

FHEBERT

Member
Licensed User
Longtime User
Thanks a lot !
This code (Erel) works only with WebView.
I don't know why this doesn't works with AdvanceWebView.
So, I will use the WebView Library
 
Upvote 0
Top