Skip to content

Instantly share code, notes, and snippets.

@mstefanko
Created March 28, 2011 13:32
Show Gist options
  • Save mstefanko/890456 to your computer and use it in GitHub Desktop.
Save mstefanko/890456 to your computer and use it in GitHub Desktop.
retrieving notes about contacts
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