开发者

How to solve "301 moved permanently" in android webview?

I am trying to implement foursquare OAuth based authentication in my android app. It works fine in my Andorid web brows开发者_如何学编程er, but it displays "301 moved permanently" in Android webview. I tried to debug it and found that it displays this error on following URL:

https://foursquare.com/mobile/login?continue=%2Fmobile%2Foauth%2Fauthorize%3Foauth_token{my_token}

And the same URL works fine on Andriod browser. So, I think there is something need to be done with webview seetings.


I have solved this issue by overriding following method:

 @Override
        public void onReceivedSslError(WebView view, SslErrorHandler handler,
                SslError error) {

            handler.proceed();              
        }


This is caused by an invalid certificate. The certificate should be fixed on the server, not in Android.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜