title: Android: Set user-agent on WebView not working
body: <p>I have a WebView on an activity where I load some urls. The point is that some of them I want to load the desktop version of them and not the mobile so I'm trying to define a user agent from a desktop version browser. On the emulator is working fine but when I'm trying it on my phone divice is not working and is loading the mobile version. Below is my snippet code from onCreate() method from the activity. Any ideas?</p>
  
  <p><strong>onCreate()</strong></p>
  
  <pre><code>WebView webView = (WebView) findViewById(R.id.webView);
  webView.getSettings().setJavaScriptEnabled(true);
  if(usera.equals("pc")) {
      webView.getSettings().setUserAgentString("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/20100101 Firefox/4.0");
  }else {
       webView.getSettings().setUserAgentString("Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30");
  }
  webView.loadUrl(url);
  </code></pre>