[ad_1]
I have a Cordova application build for Android, iOS and Windows platforms. As per latest google play store guidelines, I am generating my Cordova Android application by targeting API level 30. When I set API 30 , the rest calls(jquery Ajax calls) in my app are not working and giving ERR_PROXY_CONNECTION_FAILED in the console.
When VPN is off it is giving ERR_TIMEOUT. the same app with working fine in Android 10 and below devices without any issue. Rest Calls are accessible with https and VPN on.
To support Android 11 and Above, I have followed all the required steps to be included in Config.xml file with permissions. I have already added below changes in config file to support Android 11 and above, but facing PROXY_CONNECTION_FAILED error.
Cordova : 11.0.0
Cordova-android:9.1.0
Installed whitelist plugin
Config.xml changes
<access origin="*" subdomains="true"/>
<allow-navigation href="*" />
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
<preference name="android-targetSdkVersion" value="30" />
<preference name="android-compileSdkVersion" value="30" />
<preference name="android-minSdkVersion" value="22" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge"
target="/manifest/application">
<application android:usesCleartextTraffic="true" />
</edit-config>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<uses-library
android:name="org.apache.http.legacy"
android:required="false"/>
</config-file>
</platform>
Also tried with network_security_config.xml file as well but that is also not working.
What else i am missing here. Does any one face same issue or any suggestions to fix this problem appreciated .
Thanks in advance
[ad_2]