Today morning I found solution that seems to be working.
The Java part
Initialize your WebView:
WebView _webView = (WebView) this.findViewById(R.id.id_of_your_webview_in_layout);
get WebView settings:
WebSettings settings = _webView.getSettings();
set following settings:
settings.setJavaScriptEnabled(true);
settings.setAllowFileAccessFromFileURLs(true); //Maybe you don't need this rule
settings.setAllowUniversalAccessFromFileURLs(true);
now you can load your your html file by standard way:
_webView.loadUrl("file:///android_asset/www/index.html");
The Javascript part
Create XHR request by standard way
var xhr = new XMLHttpRequest();
xhr.open("get", "http://google.com", false);
xhr.send();
Print the result somewhere
document.body.innerHTML = xhr.responseText
NOTICE:
This procedure works only on API level 16 or higher (At least the documentation says that).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…