title: How can I choose a phone number with Android's contacts dialog
body: <p>I'm using the old Contacts API to choose a contact with a phone number. I want to use the newer ContactsContracts API. I want...</p>
  
  <ol>
  <li>...a dialog shown with all contacts that have phone numbers.</li>
  <li>...the user to choose a contact AND one of their phone numbers.</li>
  <li>...access to the chosen phone number.</li>
  </ol>
  
  <p>The ContactsContracts is very complicated. I found many examples, but none that fit my needs. I don't want to choose a contact and then query for the contact's details because this will give me a list of their phone numbers. I need the user to choose ONE of the contact's phone numbers. I don't want to have to write my own dialogs to display the contacts or to have the user pick a phone number. Is there any simple way to get what I want?</p>
  
  <p>Here is the old API code I'm using:</p>
  
  <pre><code>static public final int CONTACT = 0;
  ...
  Intent intent = new Intent(Intent.ACTION_PICK, Contacts.Phones.CONTENT_URI);
  startActivityForResult(intent, CONTACT);
  ...
  public void onActivityResult (int requestCode, int resultCode, Intent intent) {
    if (resultCode != Activity.RESULT_OK || requestCode != CONTACT) return;
    Cursor c = managedQuery(intent.getData(), null, null, null, null);
    if (c.moveToFirst()) {
       String phone = c.getString(c.getColumnIndexOrThrow(Contacts.Phones.NUMBER));
       // yay
    }
  }      
  </code></pre>