mbaroukh once told me, maybe helpful:
From: mbaroukh <[email protected]>
Date: Fri, 8 May 2009 10:30:16 -0700 (PDT)
Local: Sat, May 9 2009 1:30 am
yes.
I need to do this to retrieve current apn proxy.
Her is how I did it :
Cursor mCursor = getContentResolver().query(Uri.parse("content://
telephony/carriers"), new String[] {"name"}, "current=1", null, null);
if (mCursor!=null) {
try {
if (mCursor.moveToFirst()) {
String name =
mCursor.getString(0);
.. do what ever you wan't
with it ...
}
}
} finally {
mCursor.close();
}
}
So, as you see, it's where clause "current=1" that select the current
apn.
Fields you can retrieve can be found in
com.android.providers.telephony.TelephonyProvider :
db.execSQL("CREATE TABLE " + CARRIERS_TABLE +
"(_id INTEGER PRIMARY KEY," +
"name TEXT," +
"numeric TEXT," +
"mcc TEXT," +
"mnc TEXT," +
"apn TEXT," +
"user TEXT," +
"server TEXT," +
"password TEXT," +
"proxy TEXT," +
"port TEXT," +
"mmsproxy TEXT," +
"mmsport TEXT," +
"mmsc TEXT," +
"type TEXT," +
"current INTEGER);");
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---