Webpage not available on Honeycomb webview
We have a webview that we are loading from android_assets. This works fine in 2.1, 2.2, and 2.3. However, when we load it in 3.0, we get a "Webpage not available" message.
This only happens on pages where we are passing parameters to the webview:
WebView webView = (WebView) findViewById(R.id.my_webview);
webView.getSettings().setJavaScriptEnabled(true);
web开发者_开发知识库View.addJavascriptInterface(new JavaScriptInterface(this), "androidInterface");
webView.setBackgroundColor(0);
//This works
webView.loadUrl("file:///android_asset/my.html");
//This does not work.
webView.loadUrl("file:///android_asset/my.html" + "?param=value");
Any idea how to get this to work on Honeycomb?
Not answer to the original problem, but a workaround. Since I was already using the JavascriptInterface, I set the value that I wanted to read in Javascript on the JavascriptInterface.
精彩评论