Actually getting the setting is pretty difficult because it's not a
universal setting (CDMA devices don't have a preferred network type
setting), so the setting itself isn't exposed in a universal way.

You could try setting up a broadcast receiver for
ConnectivityManager.CONNECTIVITY_ACTION and testing to see if the
network type has changed and whether it ever switches to 3G using
TelephonyManager (http://developer.android.com/reference/android/
telephony/TelephonyManager.html)

If you want an example of how to set the receiver up you can find one
in the system browser app;

http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a=blob;f=src/com/android/browser/BrowserActivity.java;h=5e557893b5b61976ea23860e0d52fc14f1644a82;hb=307bddd3006fd4d0fd8f8c6b63cd781582e6fb09

lines 244-263.

Al.


On Jul 9, 5:11 pm, Craig <craigme...@gmail.com> wrote:
> I support people in my organization who use android phones - I
> frequently run into people who have set their device to 2G only to
> save battery and forget that they made that choice.  Then they call me
> at a later date to complain that they aren't getting 3G connections.
> I've been looking for a way to write an application on the device that
> can pull that metric and send it to me.  I'm only able to find an api
> for Network the user is currently on - does anyone know if there is a
> way to determine if the user has made a preference choice for 2G
> only?  It's an option in the Wireless menu but I can't seem to find a
> way to see if that setting has been chosen.
> Thanks for the help
> Craig

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to