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);");
On 18 avr, 11:01, biAji <[email protected]> wrote:
> Hi guys,
>
> Is there any method in the SDK can getcurrentactiveapnname ?
>
> Any comment is welcome~
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---