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
Post a Comment