title: phonegap jQuery .ajax cross domain requests work in browser, fail in Android SDK
body: <p>I've been on this now for three days, and I've tried pretty much every piece of alternative code and fixes to no avail. </p>
  
  <p>Here's the code, taken from bog-standard jQuery examples:</p>
  
  <pre><code>    $.ajax({
              url: "http://api.wunderground.com/api/4213a68e7f20c998/geolookup/conditions/forecast/q/Australia/Noarlunga.json",
              dataType: "jsonp",
              success: function(parsed_json) {
                 alert("YEP!");
                 var loc = parsed_json['response'];
                 var weather = "Location: " + parsed_json.location.city + "&lt;br /&gt;";
                 weather += "Wind: " + parsed_json.current_observation.wind_dir + " ";
                 weather += parsed_json.current_observation.wind_mph + "-" + parsed_json.current_observation.wind_gust_mph + " knts";
                 $("#info").html(weather);
             }    
      });
  </code></pre>
  
  <p>and here's some config that lots of people suggested ( which did nothing )</p>
  
  <pre><code>    $( document ).bind( "mobileinit", function() {
          // Make your jQuery Mobile framework configuration changes here!
          $.mobile.allowCrossDomainPages = true;
          $.mobile.ajaxEnabled = true;
          $.mobile.pushStateEnabled = false;
          $.mobile.allowCrossDomainPages = true;  
      });
  </code></pre>
  
  <p>In addition, I have:</p>
  
  <ul>
  <li><p>added &lt;uses-permission android:name="android.permission.INTERNET" /&gt;   to the AndroidManifest.xml file</p></li>
  <li><p>tested the json request URL in the browser on the same target ( works fine )</p></li>
  <li>tested the page in FireFox / Chrome ( works fine )</li>
  <li>tried the app on my Galaxy s2 over 3G ( UI all works fine but ajax request STILL fails )</li>
  </ul>
  
  <p>Note this isn't the complete code, but it's just sitting in a standard phonegap deviceready listener event function wrapped in a standard .ready() function.</p>
  
  <p>The fact this fails on my phone AND the SDK would seem to indicate a phonegap / Eclipse issue, and not a connection / permission issue.</p>
  
  <p>I am trying to deploy to an Android 2.3 AVD, using the Android SDK. I haven't tried deploying to an Android 4 AVD yet.</p>
  
  <p>I'd love it if anyone knows what the problem is because I've run out of suggestions to try!</p>