Questions tagged «android-contacts»

15
在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()); 但是,这只会返回每个联系人的主要电话号码,但是我也想获取次要电话号码。我怎样才能做到这一点?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.