Android的代理无线移动VS [英] Android proxy wifi vs mobile

查看:105
本文介绍了Android的代理无线移动VS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是一个烂摊子,当涉及到Android中的代理支持和太多的无奈了。我读的大部分信息对SO,我仍然感到困惑。

I know it is a mess when it comes to proxy support in Android and a lot of frustration too. I read most of posts on SO and I am still confused.

我想同时支持无线代理和移动代理,我知道,一直在代理支持蜂窝前和后的蜂窝一些变化。我也看了,你需要一个系统的应用设置代理服务器,即使你有android.permission.WRITE_SECURE_SETTINGS权限。

I would like to support both Wifi proxy and mobile proxy and I know that there has been some changes in proxy support prior to honeycomb and post honeycomb. I also read that you need to be a system app to set proxy even if you have the android.permission.WRITE_SECURE_SETTINGS permission.

所以,我可以设置系统代理从我的应用程序的WiFi和移动网络?蜂窝状前和蜂巢后有何区别?

So can i set system proxy for wifi and mobile network from my application? Any difference before honeycomb and after honeycomb?

什么是preferred的方式来获得代理设置,支持WiFi和移动网络?蜂窝状前后有什么区别?如果我想在我的应用程序使用它,它是简单的HttpClient的对象上设置代理服务器参数?什么我需要做什么?或者我应该使用系统属性?

What's the preferred way to get proxy settings for wifi and mobile network? Any difference before honeycomb and after? If I want to use it in my app, is it simple as setting proxy parameter on the httpClient object? Anything else I need to do? Or should I use system property?

请考虑在WiFi和移动代理服务器可能是不同的情况。

Please consider the case where Wifi and mobile proxy could be different.

任何指针在一个很好的文件(更新以反映自蜂窝状改变)将是非常有益的。我没有找到任何好的。

Any pointer to a good document on this (updated to reflect changes since honeycomb) would be very helpful. I did not find any good ones.

推荐答案

通过反射,你可以得到每个Wi-Fi接入点的代理设置。这就是这个库呢。你可以用它方便地访问的代理服务器设置为当前配置。

With reflection you can get the proxy settings for each Wi-Fi access point. It's what this library does. You can use it to easily access the proxy settings for the current configuration.

这篇关于Android的代理无线移动VS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆