Current used APN?
I added two APN configurations and then scanned the APN database. I noticed that both APN entries 开发者_如何学Care marked as "current=1".
how can I identify the currently active APN configuration programmatically?
thanks!
you probably are using:
Cursor c = context.getContentResolver().query(Uri.parse("content://telephony/carriers/current"), null, null, null, null);
This URI returns the entire list of APN. To return only selected APN use:
Cursor c = context.getContentResolver().query(Uri.parse("content://telephony/carriers/preferapn"), null, null, null, null);
精彩评论