2014年4月2日水曜日

Proxy対応してみた。

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 件のコメント:

コメントを投稿

シャットダウン時の後処理 (shutdown)

# vi /etc/systemd/system/drop.service [Unit] Description= stop httpgwd DefaultDependencies=no Before=shutdown.target RefuseManualStart=true ...