title: Publish Cordova app for Android 9 (Android API 28) get internet connection error
body: <p>I develop cordova cross platform app using HTML5 &amp; Javascript. But recently I encountered some problems with android.</p>
  
  <p>Previously I was using Cordova 7 where android version was 6.3
  Which supports android API 16 to 26. But as per new google rule, from August 2019, All app must be targeted Android API 28 which is Android 8 &amp; Android 9.</p>
  
  <p>Cordova's latest version is Cordova 9 which supports Android 8. Cordova did not release any version which supports Android 9.</p>
  
  <p>So to develop App targeting API 28, I've to use Android 8. But I'm facing some problems with the app. Previously my app was working fine. When I develop app with Android 8 with Cordova 9, it is working fine with all phones which are Android 8 and below but showing error in Android 9. Specially with AJAX requests.</p>
  
  <p>I'm sending AJAX requests to a server with http (not https). In some blog I see it might cause error. But I don't see any way to fix and currently I've no option to use https.</p>
  
  <p>Another way is to set <code>&lt;preference name="android-targetSdkVersion" value="26" /&gt;</code> which works fine in all android version (6~9) but when I upload with this config in Google Play store, it shows warning to update to target API to 28. </p>
  
  <p>So for now what should I do?</p>
  
  <p>Thanks in advance.</p>
  
  <p>N.B:
  I found a way to use http but did not understand it at all. If anyone can explain I'll be glad. Link given below:
  <a href="https://developer.android.com/training/articles/security-config" rel="nofollow noreferrer">https://developer.android.com/training/articles/security-config</a></p>
  
  <p><a href="https://stackoverflow.com/questions/54448312/ajax-error-in-cordova-app-after-upgrade-phone-to-android-9-pie-api-28-revision-6">Ajax error in Cordova App after upgrade phone to Android 9 Pie API 28 Revision 6</a></p>