Get all informations of specific contact by _ID
<p>See this source: </p>

<pre><code> private void populateContactList() {
    // Build adapter with contact entries
    Cursor cursor = getContacts();
    /*
    String[] fields = new String[] {ContactsContract.Data.DISPLAY_NAME};
    SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.contact_entry, cursor,
            fields, new int[] {R.id.contactEntryText});
    mContactList.setAdapter(adapter);*/

    while(cursor.moveToNext()){
        int id = cursor.getInt(0);      
        String nome = cursor.getString(1);
        Log.i("ContactsTest", id + " - "+ nome);
    }

}

/**
 * Obtains the contact list for the currently selected account.
 *
 * @return A cursor for for accessing the contact list.
 */
private Cursor getContacts()
{
    // Run query
    // se tem número de telefone

    Uri uri = ContactsContract.Contacts.CONTENT_URI;
    String[] projection = new String[] {
            ContactsContract.Contacts._ID,
            ContactsContract.Contacts.DISPLAY_NAME,
            ContactsContract.Contacts.HAS_PHONE_NUMBER,                
    };
    //trazer só os contatos que possuem ao menos um número. 
    String selection = ContactsContract.Contacts.HAS_PHONE_NUMBER + " = " + "0";
    String[] selectionArgs = null;
    String sortOrder = ContactsContract.Contacts.DISPLAY_NAME + " COLLATE LOCALIZED ASC";

    return managedQuery(uri, projection, selection, selectionArgs, sortOrder);
}
</code></pre>

<p>how get all informations of one user by _ID inside while loop? </p>

<p>Can you help me?</p>

<p>Thanks</p>

<p>Mateus Dias</p>
