How can you set the http proxy programmatically?

后端 未结 6 1936
暗喜
暗喜 2020-12-06 05:30

I\'m looking for a programmatic way to set-up http proxy settings for android handsets. I\'ve tried using android.provider.Settings.System.putString() to set System.HTTP_PR

6条回答
  •  醉话见心
    2020-12-06 06:07

    Did you try to call the com.android.settings.ProxySelector activity and let the user to enter the proxy? It's stored globally, but seems that it doesn't support the standard Proxy and ProxySelector API (for this problem there is already another question: How users/developers can set the Android's proxy configuration for versions 2.x?)

提交回复
热议问题