My app has a WebView and I want to configure it to use a proxy. Apparently Android doesn't have an API that I can use to achieve this but I found some a couple of articles on StackOverflow showing how to do it via reflection:
Unfortunately the methods in the first article only work up to KitKat 4.4 and the Android L/5.0 way of doing it requires setting the application-wide proxy settings (via System.setProperty("http.proxyHost", ...)
and System.setProperty("http.proxyPort", ...)
which affects more than just the WebView. For example, the Apache HTTP client seems to pick up these settings too.
Is there a way to set proxy settings just for WebViews without affecting other components of the app?