Network security config file

I get that, but my primary goal is to help you solve this without touching that file.

Google and Apple are attempting to get all apps running on their platforms using HTTPS instead of unencrypted HTTP for user security reasons, and that’s a good thing. In Android’s case, mandated HTTPS usage went from opt-in in API 27 to opt-out in API 28 (Android 9), which would explain why something that used to work for you suddenly stopped doing so.

If you just use https endpoints for all your network requests, everything should again just work, and I would consider that the optimal solution. Ordinarily this is very easy, if you control any backends - you just get an SSL cert (I use letsencrypt) and away you go. If you don’t control the backend, and whoever does isn’t willing or able to add SSL support, then another option would be to make a proxy somewhere out on the internet that does support HTTPS, have your app talk to it instead of the real backend, and then have the proxy reroute requests over ordinary HTTP to the actual backend. It’s not a great solution, especially for scalability, but it’s better than nothing.

All that being said, I think if you do end up having to edit anything, it is likely to be AndroidManifest.xml. See this thread.

1 Like