Skip to content

Instantly share code, notes, and snippets.

@codesburner
Forked from mstefanko/gist:890456
Created April 5, 2011 08:20
Show Gist options
  • Select an option

  • Save codesburner/903228 to your computer and use it in GitHub Desktop.

Select an option

Save codesburner/903228 to your computer and use it in GitHub Desktop.
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