title: Android: Obtaining Contact List via CursorLoader - Name/Number/NumberType
body: <p>I'm loading the Phone's contact list for use with an AutoCompleteTextView and I want to show the Phone Type (Work, Home, etc) via test but right now I just get the numerical type ID back (1,2,3)</p>
  
  <p>How can I get the name:  Here's the code below - all help appreciated.</p>
  
  <pre><code>static final String[] CONTACTS_SUMMARY_PROJECTION = new String[]
          {
          ContactsContract.CommonDataKinds.Phone._ID,
          ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME,
          ContactsContract.CommonDataKinds.Phone.NUMBER,
          ContactsContract.CommonDataKinds.Phone.TYPE
  };
  
  public Loader&lt;Cursor&gt; onCreateLoader(int id, Bundle args)
  {
      try
      {
          String SELECTION = "((" + ContactsContract.Contacts.DISPLAY_NAME + " NOTNULL) AND ("
                  + ContactsContract.Contacts.DISPLAY_NAME + " != '' )" + "AND (" + ContactsContract.Contacts.HAS_PHONE_NUMBER + "=1))";
          //        + ContactsContract.Contacts.DISPLAY_NAME + " like 'p%' )" + "AND ("+ContactsContract.Contacts.HAS_PHONE_NUMBER +"=1))";
  
          if (mSelection.length() &gt; 0) {
              SELECTION = "((" + ContactsContract.Contacts.DISPLAY_NAME + " NOTNULL) AND ("
                      + ContactsContract.Contacts.DISPLAY_NAME + " like '" + mSelection + "%' )" + "AND (" + ContactsContract.Contacts.HAS_PHONE_NUMBER + "=1))";
          }
  
          return new CursorLoader(this, ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
                  CONTACTS_SUMMARY_PROJECTION, SELECTION, null,
                  " DISPLAY_NAME ASC");
      }
      catch(Exception e)
      {
          Log.d(TAG, "onCreateLoader:Exception:" + R.string.Exception + ":" + e.getMessage());
      }
      return null;
  }
  </code></pre>
  
  <p>//this is how the cursor adapter is set:</p>
  
  <pre><code>            mAdapter = new SimpleCursorAdapter(this, R.layout.contactview, null,
                      new String[]{ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.CommonDataKinds.Phone.TYPE},
                      new int[]{R.id.ccontName, R.id.ccontNo, R.id.ccontType}, 0);
              mTxtPhoneNo.setAdapter(mAdapter);
  </code></pre>