I\'m trying to do basic authentication to view a protected url. I want to access the protected url which looks like this:
http://api.test.com/userinfo/vid?=1
If you do not mind writing your username and password into the url, then it is not necessary to change your webview client.
Just open the following url in the webview:
http://username:password@api.test.com/userinfo/vid?=1234
The default behavior of a WebView is to discard all authentication requests. Even if setHttpAuthUsernamePassword.
You have to set a WebViewClient and Override the method onReceivedHttpAuthRequest