How to handle Basic Authentication in WebView

I reckon a more elegant solution than the one Patrick describes would be to use the onReceivedHttpAuthRequest method of WebViewClient as described here: http://www.mail-archive.com/[email protected]/msg30468.html

@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {
    handler.proceed("username", "password");
}

Leave a Comment