I am confused about the network proxy API of android. It seems there are some separate proxy APIs in different packages and I don’t know which API is preferred.
The “android.net” package uses the “Proxy” class for proxy API. From code of “Proxy.getHost(…)” method we can see that it returns proxy from “Settings.Secure.HTTP_PROXY” in DB if it is set by user from the “ProxySelector” activity, or else it returns the carrier property of “net.gprs.http-proxy”. This API is used by the browser app. The “java.net” package uses the “ProxySelector” class for proxy API. Its default implementation class “ProxySelectorImpl” reads proxy value from properties of “http.proxyHost”, “socksProxyHost”… This API seems to be used by Gears and IM app. Some apps, such as the email, use the dalvik “Socket” API directly and do not realize the proxy. So I am quite confused that these APIs read different settings and provide different mechanism. Which proxy network API should be preferred for application development? And considering the WIFI network, does the system provide two separate proxy settings for WIFI and carrier network? Does the proxy switch if network is switched between WIFI and carrier network? Could anybody help me make this clear? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

