if i choose contact, i didn't get the contact that i mean
<p>i know how to get all contact on Android, but if i choose the contact i can't get the contact what i want. example : i have 4 contact</p>

<pre><code>joe have phone number 7889 987;
erick have phone number 8792 871;
nona phone number 3653 872 and 2345 907;
rina phone number 8796 235;
</code></pre>

<p>if i choose joe, i get nona's phone number= 2345 907
i don't know what is the problem on my application.</p>

<p>this is my code</p>

<pre><code>public void tambahPenerima ( View v ) {
    Intent i = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI);
    i.setType(ContactsContract.Contacts.CONTENT_TYPE);
    startActivityForResult(i, PICK_CONTACT);    
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {     
    if(resultCode == RESULT_OK) {
            Cursor cursor = null;
            String name = "";
            String number = "";

            cursor = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, null, null, null);

            while(cursor.moveToNext()) {
                name = cursor.getString(cursor.getColumnIndex((ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME)));
                number = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
            } 
                if(cursor!=null) {
                    cursor.close();
                }

                Intent kirimPesan = new Intent();
                kirimPesan.setClass(this, kirimPesan.class);
                kirimPesan.putExtra("nama", name);
                kirimPesan.putExtra("nomor", number);
                kirimPesan.putExtra("chiper", chiper);
                startActivity(kirimPesan);
    }                   
}
</code></pre>

<p>Somebody please help me, I really need help.
Sorry for my poor english.
thanks ..</p>
