I display local html file in a WebView. It works, but the pictures in the html page do not show. They are coded to be next to the html page, and I verified the pictures files are indeed there, as expected.
Yes, indeed, I came to believe I need to use an absolute path. But path will not be the same in debug as in release. I had hoped by putting the picture file next to the HTML page it would work in relative.
I will try to embed the picture as Base64.
Thanks warwound. BTW congratulations for WebViewExtras.
Yes, you are right. I already use WebViewAssetFile to get the html file.
Embedding an image in the HTML code does work, but since I need it many times in an HTML table for buttons, I am now going to try WebView.LoadHTML and place the URL to the file at run time, so I can place the proper absolute path.
That one second load time might be the WebView being slow to render your HTML, or it might be your b4a code building the large HTML string.
Are you using a StringBuilder to build your HTML string or string concatenation?
Try a Stringbuilder and see if that improves the time taken to create your HTML string.
I know this is an old thread, but I picked up from there in my development course.
In short, html src with ".unpacked" in the picture name would not work. No dice. So I could not use picture files from assets. Strangely enough, I could loadURL the picture file, but if it was inside a page, it would not display.
My solution was to use base64 encoded pictures in the HTML source.