Created
March 28, 2011 13:32
-
-
Save mstefanko/890456 to your computer and use it in GitHub Desktop.
retrieving notes about contacts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String noteWhere = ContactsContract.Data.CONTACT_ID + " = ? AND " + ContactsContract.Data.MIMETYPE + " = ?"; | |
String[] noteWhereParams = new String[]{id, | |
ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE}; | |
Cursor noteCur = cr.query(ContactsContract.Data.CONTENT_URI, null, noteWhere, noteWhereParams, null); | |
if (noteCur.moveToFirst()) { | |
String note = noteCur.getString(noteCur.getColumnIndex(ContactsContract.CommonDataKinds.Note.NOTE)); | |
} | |
noteCur.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment