I'm developing application in android. I have contactID, so how c开发者_如何学运维an I fetch particular People._ID record from contact list?
If you use the new ContactsContract API:
String selection = ContactsContract.Data.CONTACT_ID +" = ?";
String[] selectionArgs = new String[]{id}
Cursor cursor = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, null, selection, selectionArgs, null);
As you see, you have to use the selection- and selectionArgsParameters of the query-Methode to achieve the where clause.
精彩评论