0
내 안드로이드 애플 리케이션에 내 라스베리 파이에서 웹 페이지를로드하는 WebView가 있습니다. 이 웹 페이지는 기본 인증에 의해 보호됩니다.Android WebView HTTP 인증 재시도 중지
webView.setWebViewClient(new WebViewClient() {
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {
handler.proceed(user, pass);
}
@Override
public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
super.onReceivedHttpError(view, request, errorResponse);
// I'm always landing here if authentification fails.
}
});
webView.loadUrl(protocol + "://" + hostname + ":" + port);
인증이 실패하면 어떻게 다시 시도 할 수 있습니까? 이 작업을 중단하지 않으면 앱을 종료 할 때까지 앱이 매초 요청을 보냅니다.
감사합니다.