I am making an application in which i want to open a local html page in the browser. I am able to open google.com. But when i\'m opening local html file. But i am getting fo
Open and load as raw resource and then place into WebView with loadData:
InputStream page = getResources()
.openRawResource(R.raw.my_web_page);
BufferedReader r = new BufferedReader(new InputStreamReader(page));
String s;
while ((s = r.readLine()) != null)
builder.append(s);
r.close();
myWebView.loadData(builder.toString(), "text/html", "UTF-8");
Only your own application can easily read your assets.
If you need to open the file with exactly the external browser, save the obtained string to some public location where the external browser could also access it.