Search code examples
androidandroid-webviewwebviewclient

What does the method `WebViewClient.onReceivedLoginRequest` do


In the document said: "Notify the host application that a request to automatically log in the user has been processed.", however, I don't understand this. Can anyone explain it in detail.


Solution

  • onReceivedHttpAuthRequest gets called for Basic access authentication. It's quite likely that your router uses this to ask you for the password if you're connecting through the web interface.

    onReceivedLoginRequest gets called when the server sends you the x-auto-login header. A more detailed explanation can be found here, for example.