Retrieving a contacts notes
<p>I'm still very new to android app development, and I have hit a problem I hope u can help me with...</p>

<p>I am trying to retrieve any "Notes" stored against a contact within my phone. I want to check if a contact (current caller) has any notes associated to them, and then either display the contents or do some action depending on the content of them etc...</p>

<p>I have tried the code below as a test to see if the data is retrieved anywhere within my cursor, but although it retrieves some data, I can't see the content of a note - so I guess I'm in the wrong place!</p>

<p>Where I have declared contentID, this is a result of doing a lookup with the code below, and using the id that is recieved. </p>

<pre><code>Uri lookupUri = Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, Uri.encode(inCommingNumber));
String[] mPhoneNumberProjection = { Phone._ID, Phone.NUMBER, Phone.DISPLAY_NAME};
Cursor cur = getContentResolver().query(lookupUri , mPhoneNumberProjection, null, null, null);


private boolean hasNote(String contactID){
    Boolean noteFound = false;

Cursor noteCur = getContentResolver().query(ContactsContract.Data.CONTENT_URI, null, null, null, null);
if(noteCur.moveToFirst()) { 
     int numCols = noteCur.getColumnCount();
     if(numCols &gt; 0){
         for(int x = 0; x &lt; numCols; x++){
             Log.d(APP_TAG, " column " + x + " contains: " + noteCur.getString(x));
         }
     }

    noteFound = true;   
} else{
    Log.d(APP_TAG, "No Note retrieved");
}

noteCur.close();
return noteFound;
}
</code></pre>

<p>Apologies, I cant seem to get the code to display properly in this post!!</p>

<p>Any help would be great</p>

<p>I have tried various things, but can't seem to be able to get this data. I have created the note by simply adding it through the normal contact manager. I'm using Android 2.2.</p>
