WebView - onReceivedHttpAuthRequest never stops

Question

I got to a dead loop in Android webview application , the app gets blocked on onReceivedHttpAuthRequest function.

mWeb.setWebViewClient(new WebViewClient() {
   @Override
   public void onPageFinished(WebView view, String url) {
       mProgressBar.setVisibility(View.GONE);
   }

   @Override
   public void onReceivedHttpAuthRequest(WebView view,HttpAuthHandler handler, String host, String realm) {
           if (isAdded())
               handler.proceed(getResources().getString(R.string.username), getResources().getString(R.string.pass));
   }

   @Override
   public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
       handler.proceed();
   }
});
mWeb.loadUrl(mUrl);

Show source
| android   | webview   2017-01-04 11:01 0 Answers

Answers ( 0 )

◀ Go back