Ok, I guess I found the answer myself in RequestQueue from the android
sources

    /**
     * Because our IntentReceiver can run within a different thread,
     * synchronize setting the proxy
     */
    private synchronized void setProxyConfig() {
        NetworkInfo info = mConnectivityManager.getActiveNetworkInfo
();
        if (info != null && info.getType() ==
ConnectivityManager.TYPE_WIFI) {
            mProxyHost = null;
        } else {
            String host = Proxy.getHost(mContext);
            if (HttpLog.LOGV) HttpLog.v("RequestQueue.setProxyConfig "
+ host);
            if (host == null) {
                mProxyHost = null;
            } else {
                mActivePool.disablePersistence();
                mProxyHost = new HttpHost(host, Proxy.getPort
(mContext), "http");
            }
        }
    }

My question is what would happen if the DHCP server for wifi would
impose a proxy? Would it then be handled transparently?

Am I missing something or wouldnt it be very nice if there was a
public http api which would do all of this for me? AFAICS
android.net.http.HttpConnection et al are not accessible via the
public SDK.

cheers
- Rainer

On Nov 18, 11:56 am, Rainer <[email protected]> wrote:
> Hi
>
> I have the following setup. I have a 1.6 phone with an apn that
> requires a proxy, in addition I have a wifi connection that does not
> require a proxy (or maybe it requires a different one).
> My app uses android.net.Proxy.getHost(context) in order to find out
> the current proxy settings but even if I am on wifi, this call returns
> the proxy from the currenctly selected apn.
>
> So is this a bug or intentional? In any case how do I get the correct
> proxy (or the lack thereof) information?
>
> 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

Reply via email to