I am writing a android app to load a webpage that busybox httpd
authentication is needed.
I load the page with loadUrl like following:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWebView = (WebView) findViewById(R.id.webview);
mWebView.setWebViewClient(new HelloWebViewClient());
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.setWebChromeClient(new WebChromeClient()
{
@SuppressWarnings("unused")
public boolean onJSAlert(WebView view, String url, String message,
JsResult result)
{
return true;
}
public boolean onJsPrompt(WebView view, String url, String message,
String defaultValue, JsPromptResult result)
{
return true;
}
public boolean onJsConfirm (WebView view, String url, String message,
JsResult result)
{
return true;
}
});
mWebView.loadUrl(strURI);
}
But it can't prompt the authentication, instead it shows unauthorized 401.
It is able to prompt the authentication when using browser.
Please help!!!!!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en