import android.net.Proxy;
String hostname = Proxy.getHost(this.mContext);
int port = Proxy.getPort(this.mContext);
// 又は、 String hostname = Settings.Secure.getString( getContentResolver(), Settings.Secure.HTTP_PROXY);
HttpHost proxy = new HttpHost(hostname, port);
httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy);
0 件のコメント:
コメントを投稿