How to make my application NOT use 3g proxy setting

I am developing an application for Android and on pre 4.0 (ics) devices, the application works fine with http and https servers on WiFi and 3G connections. But on my ICS 4.0.3 device, the application ONLY connects to https via WiFi (it connects perfectly to http on WiFi and 3G). I realized that by manually going to the APN settings and deleting the proxy server, my application can connect to the https file via 3g. So my question is how to get httpclient to use NOT to use proxy settings through code? Thanks

+6
source share
1 answer

First of all, thanks to Cool Dude for answering your own question. I had the same problem, but I did not use HttpClient, but instead HttpURLConnection directly. In this case, the solution has the following form:

myUrl.openConnection(java.net.Proxy.NO_PROXY); 
+4
source

Source: https://habr.com/ru/post/911849/


All Articles