Facing Internet Connectivity Issues in Latest Version of Cordova Android - Cordova Android 11.0.0

191 views Asked by At

I upgraded the existing Android Application which was created using Cordova to the latest version (Cordova Android 11.0.0).After update, application is not able to connect to "Internet" and couldn't connect to Backend REST APIs. Below given the detailed information about the changes which i have done.

  1. Cordova Android Version: 11.0.0 API Level: 32

  2. Added Network Configuration File "network_security_config.xml" given its content below and referred it in the AndroidManifest.xml File.

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
 <base-config cleartextTrafficPermitted="true" />
  <domain-config cleartextTrafficPermitted="true">
    <domain includeSubdomains="true">www.developerin.net</domain>
  </domain-config>
</network-security-config>
  1. android:usesCleartextTraffic="true" is included in Application Tag inside AndroidManifest.xml File

  2. below permission is present in the Manifest file

  3. Removed the "cordova-plugin-whitelist" plugin before migration, since Latest Cordova Android(11.0.0) is not supporting the Whitelist.

  4. Also added the below line in the config.xml.

<platform name="android">
    <allow-intent href="*" />
</platform>
  1. Backend REST API which I am using is "HTTP" not "HTTPS" and previous version of the application is able to connect to API and latest version couldn't connect to API (HTTP)

Earlier version (Cordova Android API Level 29) is able to connect to "Internet" but not the new Version (Cordova Android API Level 32). Am I missing anything here? Thank you for your Time and Suggestions to resolve this Issue.

0

There are 0 answers