Native App Connection Error

Native App deployed to my mobile is throwing Connection Error when I try to test the offline capability by turning off the wifi & mobile data. Followed below steps: Deploy the App to mobile Open the App with wifi on and login to app using credentials. This is working fine Now close the app Turn off the wifi and opening the app again throws below error Any idea what is wrong? or any suggestions to test offline capability
2 answers


Any updates on this as I am experiencing the same issue?


There are few things to check here:

Follow below steps if you are building the APK file locally

  • Add below entry to AndroidManifest.xml: 


<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
    <application android:networkSecurityConfig="@xml/network_security_config"
                    ... >
  • create network_security_config.xml file with below contents under xml directory
<?xml version="1.0" encoding="utf-8"?>
    <base-config cleartextTrafficPermitted="true">
            <certificates src="system" />
            <certificates src="user" />

If you are not building locally then make sure no external API/Service calls are triggered while launching the App in offline mode

Make sure to first synchronize the data before testing offline functionality