Accessing the contact Content Provider
<p>I am just tring to access the contact Content Provider. for that i wrote following code</p>

<pre><code>Cursor cur= getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, null,null,null,null);

    startManagingCursor(cur);

    String[] result=new String[cur.getCount()];

    if(cur.moveToFirst())
    {
        int nameidx=cur.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME);
        int Ididx=cur.getColumnIndexOrThrow(ContactsContract.Contacts._ID);
        String strName=cur.getString(nameidx);
        String strId=cur.getString(Ididx);

        result[cur.getPosition()]=strName+"("+strId+")";
    }while(cur.moveToNext());

   stopManagingCursor(cur);
}
</code></pre>

<p>but its showing only one contact name i want to show all contact available please tell me how do that.</p>
