On Tue, Jan 10, 2012 at 9:39 PM, Sayed Atif Ali <[email protected]> wrote: > I need to set the proxy through my code in android devices upwards of > Android 2.3.3. The only method which I know of right now is doing it through > the shell in the emulator: > > 1. > adb shell > > > 2. # sqlite3 /data/data/com.android.providers.settings/databases/settings.db > > > 3. sqlite> INSERT INTO system VALUES(99,’http_proxy', 'proxy:port'); > > > 4. sqlite>.exit
And that will only work on the emulator or a rooted device. > Does android provide an API to do this from within the code Not device-wide. You can set properties to affect the proxy used by your own app, though. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

