I am creating an android application where user has to login via otp and to get the otp a request has to be made to an HTTP url.
It's working perfectly in all android versions except ANDROID 11 stating that:
CLEARTEXT communication not enabled for client
I added a network security config and have set usesCleartextTraffic="true"
in the manifest file. The network security config is working fine for android 9 and 10 but it doesn't work on android 11. I am using OKHTTP to make the request.
Any help would be much appreciated.