I am trying to open twitter page begining with https in webview
in android. But it is not opening and blank screen is coming with continous loading. Screen shot is below
Edit: In main webview I have link to twitter page https://twitter.com/mytwitterpage
. On clicking that link that twitter url is opening in webview. I noticed that onPageFinished method of WebViewClient is called 2 times one time for https://twitter.com/mytwitterpage
and second time for https://mobile.twitter.com/#!/mytwitterpage
.
Anyone know what is wrong here?
Thanks in advance.
Ok done by adding below line in my code
webView.getSettings().setUserAgentString("Mozilla/5.0 (Linux; U; Android 2.0; en-us; Droid Build/ESD20) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17");
I got it from this post at stackoverflow Problems loading mobile.twitter in webview.
wv.getSettings().setDomStorageEnabled(true);
This worked for me!
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