Hi Mark,

Thanks for your inputs. I have found another method in the meantime. We can
set the APN's through code and get our device to use our chosen proxy. And
one doesn't need root permissions to do that until Android ICS.
What I want now is, to be notified when the user creates a new APN through
the GUI so that I could update my list. Is there any hook which we can use
or notification generated when a new APN is manually added through the GUI?

Or is there a better way to set the proxy regardless of having root
permissions or not.

I would appreciate anyone who could help me out on this topic.

On Wed, Jan 11, 2012 at 6:18 PM, Mark Murphy <[email protected]>wrote:

> 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

-- 
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

Reply via email to