I have placed my static web application in an asset folder. My static web application has a lot of folders with files and placed in asset folder. I am calling html from another html with sub folder. I am getting 'file not found'. Can anybody tell me what the problem is? I post my code below:
wv=(WebView)findViewById(R.id.webView);
//wv.loadDataWithBaseURL("file:///android_asset/Opana_Changes/html/_assets/asset_001/index.html","","html");
try {
InputStream is=getAssets().open("Opana_Changes/index.html");
BufferedReader br=new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine()) != null) {
html=html+line;
}
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
wv.loadDataWithBaseURL("file:///android_asset/Opana_Changes/",html,"text/html", "UTF-8",null);
wv.getSettings().setJavaScriptEnabled(true);
}