Reputation: 31
I try open http://facebook.com but my webview open and display link http://m.facebook.com.
This my code.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webview);
webviewv=(WebView) findViewById(R.id.webView1);
webviewv.setWebViewClient(new WebViewClient());
webviewv.getSettings().setJavaScriptEnabled(true);
webviewv.loadUrl("http://facebook.com");
}
Anybody?
Upvotes: 1
Views: 1449
Reputation: 2185
You probably need to fake the User-Agent
parameter for your WebView
. Websites use it to distinguish the client.
webviewv.getSettings().setUserAgentString("Mozilla/6.0 (Windows NT 6.2; WOW64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1");
Upvotes: 3