I am trying to display an image in a WebView in an Android application. The image exists in the resources folder of my Android project. The HTML is software built and has this ref image in it:
HTML is loaded into the WebView with:
webView.loadDataWithBaseURL (urlStr, htmlText, "text / html", "utf-8", urlStr);
urlStr = base url needed to search for other resources. htmlText = programmatically generate HTML
WebView loads the HTML, but the image appears as "missing." I have confirmed that the image exists in this place in the assets. However, it does not appear in the WebView.
I have seen numerous publications and manuals that say this should work, but it is not for me. This is on an Android 3.2 tablet. Does anyone know if this only works on some versions of Android? Any thoughts on why this is not working in my case? Thanks.
source share