0

My app is required to have the cleartextTrafficPermitted="true" attribute, which is a problem because some third party libraries think that means they can use http instead of https.

I've implemented detectCleartextNetwork on StrictMode but when that gets triggered I only get the IP address, I don't get the domain name.

Android Studio under the network inspector shows me all calls with the URL and everything. Is there a way I can get that programmatically?

I know I can add a interceptor to okhttp for my own calls but what I need to find is calls from third party libraries that might not be using https.

Is there any way to do that?

2
  • 2
    May be better use a NetworkSecurityConfig.xml file and permit clear text http only to specific domains you need it. Commented May 17, 2023 at 21:23
  • Unfortunately my app has to talk to devices on the local network and I don't know which IPs they'll be at. Commented May 18, 2023 at 14:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.