Getting the displayed name, but not the number in Android Contact List
<p>I want to get data from Android contact list. 
I got the display_name but not the number. 
I used this code: </p>

<pre><code>while(people.moveToNext()){
            try{
                int nameFieldColumnIndex = people.getColumnIndex(Phone.DISPLAY_NAME);
                String name = people.getString(nameFieldColumnIndex);
                try{
                    int numberFieldColumnIndex = people.getColumnIndex(Phone.NORMALIZED_NUMBER);
                    String number = people.getString(numberFieldColumnIndex);
                    HashMap&lt;String,String&gt; contactMap=new HashMap&lt;String, String&gt;();
                    contactMap.put("name", name); // per la chiave image, inseriamo la risorsa dell immagine
                    contactMap.put("number",number); // per la chiave name,l'informazine sul nome
                    data.add(contactMap);  //aggiungiamo la mappa di valori alla sorgente dati
                }catch(IllegalStateException e){e.printStackTrace();}
</code></pre>

<p>and I tried: </p>

<pre><code>Uri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;
        String[] projection    = new String[] {ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME,
                        ContactsContract.CommonDataKinds.Phone.NUMBER};

        Cursor people = getContentResolver().query(uri, projection, null, null, null);
</code></pre>

<p>but the result is the same, I got the displayed name but not the number. 
I read some useful post, but I don't accomplish. 
Suggestions?</p>

<p>Thanks in advance!</p>
