• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps WebView Desktop website version

caramare

Lurker
Hello,

I am creating an aplication that involves an WebView. The thing is that I want to load the full page and not the mobile one, so I have changed the User Agent. Nevertheless there are pages that loads the mobile version. Does anyone knows how I can trick the server and tell him I am using a desktop and not a mobile.
Here are two versions of code that I have tried:

1.webview.getSettings().setUserAgentString("Mozila ");

2.
String DESKTOP_USERAGENT = webview.getSettings().getUserAgentString ();
DESKTOP_USERAGENT = DESKTOP_USERAGENT.replace("Mobile ","");
webview.getSettings().setUserAgentString(DESKTOP_USERAGENT);

This are exemples of webpages that loads the mobile version in any cases:

Jurnalul National
Download thousands of Android apps from the Android Market - AndroidZoom.com

Thank you very much,
Razvan
 
Back
Top Bottom