title: Change PhoneGap / Cordova User-Agent for AJAX
body: <p>I'm using phonegap / cordova for developing an Android app.</p>
  
  <p>The app has to read files on a remote server. Therefore I'm using AJAX (jQuery).
  The problem is: The remote server redirects all connections from mobile devices to a mobile version, which doesn't work for me, so I have to change the User Agent to a desktop browser. </p>
  
  <p>How can I do this? I've seen <a href="https://stackoverflow.com/questions/10624259/change-phonegap-user-agent">a solution for iOS</a>. Is something like this possible for Android?</p>
  
  <hr>
  
  <p><strong>Edit:</strong>
  I found a solution myself:</p>
  
  <p>Just add </p>
  
  <pre><code>WebSettings w = this.appView.getSettings();      
  w.setUserAgentString("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1");
  </code></pre>
  
  <p>to <code>/src/com/a/b/c.java</code> in <code>onCreate</code>-method.</p>