I have been researching for 2 days and I haven\'t found a similar problem anywhere on the internet!
From the main activity, I\'m trying to open a new activity contai
I can give the another way to solve this problem. Just copy the asset file into the data path
"/data/data/org.test.test/" and load it to WebView
in the following way.
String strHTMLFilePath = "file:///data/data/org.test.test/Files/help_android.html";
webView.loadUrl(strHTMLFilePath);
Use the following code to copy the HTML file from asset to data path
void getAssetFiles() {
String WriteFileName = "/data/data/org.test.test/";
try {
String list[] = thisActivity.getAssets().list("Files");
String outFileName = WriteFileName+"Files/";
if (list != null)
for (int i=0; i0){
myOutput.write(buffer, 0, length);
}
myInput.close();
myOutput.flush();
myOutput.close();
}
} catch (IOException e) {
}
}