android - Loading HTML from database into WebView
<p>so i'm trying to load some HTML from my sqlite database into a webview.
This works splendid as the html is rendered beautifully but here comes the problem. The local file added in the html is not being load. I added it to the assets folder in this hierarchy: assets/folder1/folder2/placeholder.png but i get a Not allowed to load local resource: error. How can i get past this please. </p>

<p>Please note that the data is being populated from the db.</p>

<pre><code>webView = (WebView) findViewById(R.id.webView);
    webView.getSettings().setJavaScriptEnabled(true);
    webView.getSettings().setBuiltInZoomControls(true);
    webView.getSettings().setAllowFileAccess(true);
    webView.loadData(data, "text/html", "UTF-8");
</code></pre>

<p>That's the code for the web view above.</p>

<pre><code>&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;/head&gt;&lt;body&gt;&lt;h2 style="color:red;"&gt;Hello  Chief&lt;/h2&gt;&lt;p&gt;This is just a demo HTML content rendered beautifully&lt;/p&gt;&lt;br&gt;&lt;img src="file:///android_asset/folder1/folder2/placeholder.png"&gt;&lt;/body&gt;&lt;/html&gt;
</code></pre>

<p>That's code above is for the data coming from the sqlite database.</p>

<p>My Assests folder looks something like this</p>

<pre><code>-assets
  - folder1
    - folder2
      -file
</code></pre>

<p>Thanks</p>