How can I read WiFi-Proxy setting programmatically?
GalaxyS and GalaxyTab have their own HTTP-Proxy setting specially for WiFi connection in OS level. (Menu -> Settings -> Wireless and network -> Wi-Fi setting -> Menu Key and then Advanced) It's very nice feature for otherwise you cannot use proxy servers from WiFi. (See the issue http://code.google.com/p/android/issues/detail?id=1273)
Now my application use http connection with usual HttpClient. I want to read the proxy setting from OS and put into the connection but I don't know how to read it.
With getprop command I can read proxy setting for APN, but not for WiFi. APN proxy setting is stored with key "net.gprs.http-proxy".
adb -d shell
$ getprop net.gprs.http-proxy
getprop net.gprs.http-proxy
http://proxy.example.com:8888/
$
The Advanced Setting for WiFi screen is implemented in com.android.settings.wifi.AdvancedSettings and, naturally, the preference is stored in /data/data/com.android.settings/shared_prefs/com.android.settings_preferences.xml. I just cannot read the file from my application, right?
I guess I'm stuck unless Samsung provides special API to access the setting but I couldn't find such information. BTW, many applications including mine will have great advantages with global HTTP proxy setting so I hope there is a way...