ionic app not working above android version 9 use below code

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
  <trust-anchors>         
   <certificates src="system" /> 
 </trust-anchors></base-config>
    <domain-config cleartextTrafficPermitted="true">       
      <domain includeSubdomains="true">localhost</domain> 
  </domain-config>
</network-security-config>

in resources->android-xml file add above code.
add in config.xml file.
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge"
target="/manifest/application"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:networkSecurityConfig="@xml/network_security_config" />
</edit-config>
<resource-file src="resources/android/xml/network_security_config.xml"
target="app/src/main/res/xml/network_security_config.xml" />

Comments

Popular posts from this blog

How to Add Firebase Analytics to Your NativeScript Mobile App

how to split array as per fixed length, and ionic two dates differences in min,seconds,hours