Solve ClearText Communication to IP Address not permitted by network security policy in Android

Dear All, Today i am showing you how to solve the issue of cleartext communication to IP Address not permitted in android. This error comes because starting from Android 9 (API Level 28) cleartext communication is disabled by default.All communication should be over HTTPS and HTTP not allowed.So to overcome that we want to give exceptions to certain IP Addresses that we want to communicate in cleartext format.So to do that follow the given steps

1.Create a folder named xml in resources.
2.Create a new xml resource file, let's name it network_security_config.xml
3.Now in the xml file use the format as below to add IP Addresses


4.Now in Manifest.xml file make a parameter in application tag as shown below
Voila, now clear text communication to the given Ip Addresses are ready
Share on Google Plus

About Admin

I am a Java and Android developer and a science enthusiast.I Like to explain complex things in simple language so anybody even without a graduation in computer science or Electronics can understand the concepts easily.

0 comments:

Post a Comment