title: How to retrieve contact number using a projection via an Uri with LOOKUP_KEY?
body: <p>I'm trying to use the following code to get either the contact name and its phone number:</p>
  
  <pre><code>String id = readFile("contactlookupkey");
  Uri uri = Uri.parse (ContactsContract.Contacts.CONTENT_LOOKUP_URI + "/" + id);
  
    String[] projection = new String[] {
      Contacts._ID,
      Contacts.DISPLAY_NAME,
      ContactsContract.CommonDataKinds.Phone.NUMBER
    };
  
    Cursor cursor = context.getContentResolver().query (
      uri,
      projection,
      null,
      null,
      null);
  
    if (!cursor.moveToNext()) // move to first (and only) row.
      throw new IllegalStateException ("contact no longer exists for key");
    String name = cursor.getString(1);
    String phone=cursor.getString(2);
    cursor.close();
  </code></pre>
  
  <p>But I'm getting an Illegal argument exception when executing the query, due to         ContactsContract.CommonDataKinds.Phone.NUMBER.</p>
  
  <p>Problem is I don't see any other way to get the phone number while still using the URI+looupkey.</p>
  
  <p>What could be done to obtain the phone number?</p>