开发者

Deactivate Mobile Content from Website in WebView

开发者 https://www.devze.com 2023-01-24 05:48 出处:网络
Hy my code: WebView webView = new WebView(this); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl(\"http://www.preisjaeger.at\");

Hy my code:

            WebView webView = new WebView(this);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.loadUrl("http://www.preisjaeger.at");
        setContentVie开发者_如何学Pythonw(webView);

The site the i downloaded appers on the Webview, but only the content for mobile devices.

So my Question: How to deactivate the mobile content?


The mobile content is being loaded because that site is detecting that you are on a mobile device. I would suggest trying to spoof the browser user agent string in a way that would make that site think you are not on a mobile device.

Use the method webView.getSettings().setUserAgentString()

0

精彩评论

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