I am using android webview to load a website and got the following error
net::ERR_HTTP_RESPONSE_CODE_FAILURE
I just want to know why i am getting this error. I don't find any helpful reference related to this error.
Thanks,
@Override
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request){
Log.d("WebViewActivity", request.getUrl().toString());
if( request.getUrl().toString().startsWith("http:") || request.getUrl().toString().startsWith("https:") ) {
}
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(request.getUrl().toString()));
startActivity( intent );
return true;
}
if in the shouldOverrideUrlLoading method do not do
view.loadUrl (String.valueOf (request.getUrl ()));
return false;
the error disappears
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With