title: Android(Phonegap) ajax calls
body: <p>We are working on an Android Phonegap project. we already completed the iOS Phonegap project and its working fine. The problem right now is that, in android version of project we are unable to make Ajax calls work i-e Ajax calls are not firing at all. we took the iOS project's WWW folder and converted it using Phonegap-Build and the apk it generated was working fine. The moment i try to build my android phonegap project with eclipse and debug it on device it's not working. More I tried to search on stackoverflow for similar issue and the solution didn't worked like changes in config.xml file.</p>
  
  <pre><code>&lt;access origin="*"/&gt;
  &lt;access uri="*"/&gt;
  </code></pre>
  
  <p>Morever the code is working fine in browsers and the api is working well too in direct hits. Here is the code for ajax call, </p>
  
  <pre><code> var surl = baseUrl + "Token";
      var body = "username="+username+"&amp;password="+password+"&amp;grant_type=password";
      var result = true;
      $.ajax({
         type: "POST",
         url: surl,
         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
         data: body,
         crossDomain: true,
         cache:false,
         success: function(val) {
             console.log("Success");
             var a = val.access_token;
             window.localStorage.setItem("loginState", 1);
             window.localStorage.setItem("access_token ", val.access_token);
             result = true;
             getCountries(loginResponseMethod, loginFailed, loadError);
  
         },
         error: function(xhr, status, error)
         { console.log('Error !!' + error);
          result = false;
          loginFailed();
  
         }
             });
  </code></pre>