开发者

select contact detail where People._ID = contact ID in android

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜