display contact list using a list view with checkboxes
<p>I am working on an android 2.2 app. When clicking a button I would like to display a list with checkboxes with all the contact persons from the list. After checking the persons from the list I want to display the phone numbers of the persons from the list. I don't know how to do that.</p>

<p>I don't know how to display in a listview with checkboxes all the contact persons from a list. Need some help. </p>

<p>This is my code for the ocntact list:</p>

<pre><code>   public void onActivityResult(int requestCode, int resultCode, Intent intent)
        {

          if (requestCode == PICK_CONTACT)
          {        
              Cursor cursor =  managedQuery(intent.getData(), null, null, null, null);
              cursor.moveToNext();
              String contactId = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));
               String  name = cursor.getString(cursor.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));

              Toast.makeText(this, "Contect LIST  =  "+name, Toast.LENGTH_LONG).show();
          }
        }//onActivityResult

}
</code></pre>

<p>How to put all the contact name and phone numbers in a listview with checkboxes and than when ok is pressed to save all the checked persons in a list or a vector?</p>
