2009-06-16 98 views

回答

1

您可以使用下面的查询检索所有的数字有一定联系:

/* the following line assumes that the contactCursor you described 
* has the People._ID column at index 0 in its projection. */ 
int contactId = contactCursor.getInt(0); 

Cursor numberCursor = getContentResolver().query(Phones.CONTENT_URI, 
    new String[] {Phones.NUMBER}, Phones.PERSON_ID + "=" + contactId, null, null); 
while(cursor.moveToNext()) { 
    String number = cursor.getString(0); 
} 
cursor.close();