目前浏览器是没有设置代理的ui界面的,但是浏览器的设置是放在内置的sqlite数据库中,所以可以直接操作数据库来更改代理设置。
|
http://handheld.softpedia.com/get/Network/ProxySetting-79209.shtml
ProxySetting is a simple application for Google's Android platform that allows users to specify an HTTP Proxy address to use when connected to a Wifi network.
At the time of writing Android only allows HTTP traffic to be directed at a proxy when using a Mobile network. It is likely that Android will be updated in the future to support the use of Proxies on Wifi networks, but for now this application aims to solve the problem.
Limitations
ProxySetting only allows the browser to work behind a proxy, because the browser checks for a configured proxy in the database and uses that proxy if the phone is on a mobile network, but the other apps don't do this.
The ProxySetting app updates the relevant information in the database and then sends a notification to the browser that the phone is using a mobile network (even though it's actually on wifi). So the browser thinks it's on a mobile network and updates it's proxy information, requests are then sent over wifi to the proxy.
The other apps seem to ignore the proxy settings (possibly they're not using HTTP and the proxy settings are specific to HTTP).
There is no UI for proxy settings for android web browser. But the android web browser will read the proxy settings in its settings database.
Here is the instructions to enable the proxy in the android web browser.
Posted by rtm at 7:33 PM
Labels: Android sqlite3 and database
This is exactly what i was looking for! Thank you. One question: according to you, is it possible to make sqlite queries from a java application?
I didn't try the sqlite3 in the java application. But you can try in the following two ways: 1. catenate the strings of sqlite3 database_name and sql command, place sql command into "" (quotation), run the command in java, just like invoke a process; 2. java includes the opendatabase(...) and so you will get the database context, with that context you can operate the database.