title: Cordova Android not sending AJAX request
body: <p>Hi I have developed an app using Cordova and mainly developed it by testing IOS first. I have now published the app on the App Store and now want to publish it onto the google play store.</p>
  <p>I have been testing the app via android studio and can't get past my login page. When I fill the form and submit it no AJAX request is made to check my login credentials and log me in.</p>
  <p>I am using the android studio profiler to check if a request is made and I can't see one. I have added logging before the Ajax request but after the form is submitted and that is working.</p>
  <p>After looking through multiple forums I still can't seem to get it working. I have added the white list plugin, I have setup CORS correctly because I had to do this to get it working for IOS.</p>
  <p>Here is my config.xml file</p>
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;widget id=&quot;id&quot; version=&quot;1.0.0&quot; xmlns=&quot;http://www.w3.org/ns/widgets&quot; xmlns:cdv=&quot;http://cordova.apache.org/ns/1.0&quot;&gt;
      &lt;name&gt;Title&lt;/name&gt;
      &lt;description&gt;
          description
      &lt;/description&gt;
      &lt;author email=&quot;email&quot; href=&quot;http://cordova.io&quot;&gt;
          Team
      &lt;/author&gt;
      &lt;content src=&quot;index.html&quot; /&gt;
      &lt;access origin=&quot;*&quot; /&gt;
      &lt;allow-intent href=&quot;http://*/*&quot; /&gt;
      &lt;allow-intent href=&quot;https://*/*&quot; /&gt;
      &lt;allow-intent href=&quot;tel:*&quot; /&gt;
      &lt;allow-intent href=&quot;sms:*&quot; /&gt;
      &lt;allow-intent href=&quot;mailto:*&quot; /&gt;
      &lt;allow-intent href=&quot;geo:*&quot; /&gt;
      &lt;allow-navigation href=&quot;*&quot; /&gt;
      &lt;platform name=&quot;android&quot;&gt;
          &lt;allow-intent href=&quot;market:*&quot; /&gt;
      &lt;/platform&gt;
      &lt;platform name=&quot;ios&quot;&gt;
          &lt;allow-intent href=&quot;itms:*&quot; /&gt;
          &lt;allow-intent href=&quot;itms-apps:*&quot; /&gt;
          &lt;preference name=&quot;WKWebViewOnly&quot; value=&quot;true&quot; /&gt;
          &lt;config-file parent=&quot;NSLocationAlwaysAndWhenInUseUsageDescription&quot; target=&quot;*-Info.plist&quot;&gt;
              &lt;string&gt;Background location tracking is required to notify you when you enter a location offering deals&lt;/string&gt;
          &lt;/config-file&gt;
          &lt;config-file parent=&quot;NSLocationAlwaysUsageDescription&quot; target=&quot;*-Info.plist&quot;&gt;
              &lt;string&gt;Background location tracking is required to notify you when you enter a location offering deals&lt;/string&gt;
          &lt;/config-file&gt;
          &lt;config-file parent=&quot;NSLocationWhenInUseUsageDescription&quot; target=&quot;*-Info.plist&quot;&gt;
              &lt;string&gt;Background location tracking is required to notify you when you enter a location offering deals&lt;/string&gt;
          &lt;/config-file&gt;
          &lt;config-file parent=&quot;NSMotionUsageDescription&quot; target=&quot;*-Info.plist&quot;&gt;
              &lt;string&gt;Device motion updates help determine when the device is stationary so the app can save power by turning off location-updates&lt;/string&gt;
          &lt;/config-file&gt;
      &lt;/platform&gt;
      &lt;preference name=&quot;StatusBarOverlaysWebView&quot; value=&quot;false&quot; /&gt;
      &lt;preference name=&quot;StatusBarBackgroundColor&quot; value=&quot;#262262&quot; /&gt;
      &lt;preference name=&quot;StatusBarStyle&quot; value=&quot;lightcontent&quot; /&gt;
      &lt;preference name=&quot;orientation&quot; value=&quot;portrait&quot; /&gt;
      &lt;preference name=&quot;DisallowOverscroll&quot; value=&quot;true&quot; /&gt;
      &lt;plugin name=&quot;cordova-plugin-console&quot; spec=&quot;~1.1.0&quot; /&gt;
      &lt;plugin name=&quot;cordova-plugin-statusbar&quot; spec=&quot;^2.4.3&quot; /&gt;
      &lt;plugin name=&quot;cordova-plugin-dialogs&quot; spec=&quot;^2.0.2&quot; /&gt;
      &lt;plugin name=&quot;cordova-plugin-wkwebview-engine&quot; spec=&quot;~1.2.1&quot; /&gt;
      &lt;plugin name=&quot;cordova-plugin-wkwebview-file-xhr&quot; spec=&quot;~2.1.4&quot; /&gt;
      &lt;plugin name=&quot;cordova-plugin-geofence&quot; spec=&quot;^0.7.0&quot; /&gt;
      &lt;plugin name=&quot;cordova-plugin-whitelist&quot; spec=&quot;1&quot; /&gt;
      &lt;plugin name=&quot;cordova-background-geolocation-lt&quot; spec=&quot;^3.7.0&quot;&gt;
          &lt;variable name=&quot;BACKGROUND_MODE_LOCATION&quot; value=&quot;&amp;lt;string&amp;gt;location&amp;lt;/string&amp;gt;&quot; /&gt;
      &lt;/plugin&gt;
      &lt;plugin name=&quot;cordova-plugin-cocoalumberjack&quot; spec=&quot;~0.0.4&quot; /&gt;
      &lt;plugin name=&quot;cordova-plugin-qrscanner&quot; spec=&quot;~3.0.1&quot; /&gt;
      &lt;plugin name=&quot;cordova-plugin-geolocation&quot; spec=&quot;~4.0.2&quot; /&gt;
      &lt;plugin name=&quot;cordova-plugin-local-notification&quot; spec=&quot;~0.9.0-beta.2&quot; /&gt;
  &lt;/widget&gt;
  
  </code></pre>
  <p>Here is the AJAX code which doesn't seem to make any requests.</p>
  <pre><code>$(&quot;#login_form&quot;).submit(function(e) {
      e.preventDefault()
  
      var form = $(this);
      var url = form.attr('action');
  
      $.ajax({
          type: &quot;POST&quot;,
          url: 'login-url',
          data: form.serialize(), // serializes the form's elements.
          success: function(data) {
              storage.setItem('access_token', data.access_token) // Pass a key name and its value to add or update that key.
              window.location.href = &quot;deals.html&quot;;
          },
          error: function(httpObj, textStatus) {
              if (httpObj.status == 401) {
                  navigator.notification.alert(
                      'Please try again using the correct credentials.',
                      alertDismissed,
                      'Incorrect Details',
                      'Try Again'
                  );
              }
          }
      });
  });
  </code></pre>
  <p>Any help would be really appreciated, Thanks.</p>