title: Ajax request failing in cordova/phonegap app on real device
body: <p>I'm building a <strong>Cordova 4.0 jQuery Mobile 1.4.2</strong> Android app and I'm having issues with a particular AJAX call. I've looked for similar questions and already implemented the solutions there with no success.</p>
  
  <p>Here's what happens:</p>
  
  <p>I have the following AJAX call:</p>
  
  <pre><code>var request = $.ajax({
          type: "GET" ,
          crossDomain: true,
          url: 'http://pubads.g.doubleclick.net/gampad/adx?iu=/XXX/YYY&amp;sz=300x50&amp;c=123456789'
      });
  
      request.done(function (response, textStatus, jqXHR){
  
          console.log(response);
      });
  
      request.fail(function (jqXHR, textStatus, errorThrown){
          console.error("DFP Plugin Error: " + textStatus, errorThrown);
      });
  </code></pre>
  
  <p>When I run my app in my computer's browser, that request works perfectly. However, when I build and debug the app from a <strong>real device</strong>, the request fails giving this error: <code>{"readyState":0, "responseText":"", "status":0, "statusText":"error"}</code></p>
  
  <p>I've already enabled <code>$.support.cors = true;</code> and <code>$.mobile.allowCrossDomainPages = true;</code>, and I already have <code>&lt;access origin="*" /&gt;)</code> in my config.xml file.</p>
  
  <p>Could someone help me figure out what the problem is?</p>