android - Image not appearing in my Html script -


i have section on android app called 'more information' few pages of html scripts display using webview following code -

inputstream fin = getassets().open(htmlfl + ".html");                  byte[] buffer = new byte[fin.available()];                  fin.read(buffer);                  fin.close();                  webview.loaddata(new string(buffer), "text/html", "utf-8"); 

it works fine except images not appearing on of pages. declare them using html following -

<p><img src="http://www.ourweb.co.uk/images/icon.jpg">&   nbsp;<span style="font-family: arial, helvetica, sans-serif; font-size: large;"> <b>opening times during exhibition</b></span></p> 

am doing wrong using webview , if not there way around this?

you forgot add internet permission in manifest:

    <uses-permission android:name="android.permission.internet" /> 

the webview javadoc says:

note that, in order activity access internet , load web pages in webview, must add internet permissions android manifest file:


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -