开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜