I've seen a lot of similar questions here, but none of them seem to be exactly my problem.
I'm loading a local html file from a subfolder of my assets folder into a WebView. The file is located in assets/myfolder/myfolder2/test.html.
Also in assets/myfolder/myfolder2/ I have image.jpg. Full path: assets/myfolder/myfolder2/image.jpg
I am loading the html like so:
// html contains the string content of the test.html file
webView.loadDataWithBaseURL("file:///android_asset/myfolder/myfolder2/", html,
"text/html", "utf-8", "about:blank");
In the html string, I have the following tag:
<img src="image.jpg" />
The image is not displayed. I've tried spelling out the full file:/// url to the image as well, with no luck. If I change it to link to an image somewhere out on the web, it works fine. Why can't it find my local image?