阅读android中所有联系人的电话号码
我正在使用此代码检索所有联系人姓名和电话号码:
String[] projection = new String[]
{
People.NAME,
People.NUMBER
};
Cursor c = ctx.getContentResolver().query(People.CONTENT_URI, projection, null, null, People.NAME + " ASC");
c.moveToFirst();
int nameCol = c.getColumnIndex(People.NAME);
int numCol = c.getColumnIndex(People.NUMBER);
int nContacts = c.getCount();
do
{
// Do something
} while(c.moveToNext());
但是,这只会返回每个联系人的主号码,但我也想获得次要号码。我怎样才能做到这一点?
慕容3067478
相关分类