getting notes from a single contact - android -


i'm trying "notes" single contact. added fine retrieving has been problem.

string selection = contactscontract.commondatakinds.phone.display_name+" like'%" + sender +"%'";             string[] projection = new string[] { contactscontract.commondatakinds.note.note};             cursor c2 = getcontentresolver().query(contactscontract.data.content_uri, projection, selection, null, null);             if (c2.movetofirst()) {                 notes = c2.getstring(0);                                 } 

it works fine other values name or phone number can't seem notes retrieve correctly. retrieves random value email instead.

i believe problem not rows in table represent contact types have notes. have request proper mime type.

contactscontract.commondatakinds.note alias 'data1' column present on rows, when row of different mime type, represents different data.

how contacts in android should give idea of how this.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -