Hi all,

I'm using Android 2 SDK, and have a list activity in which I want to
display the users contacts.

So I'm retrieving the contacts cursor in a standard way :

Uri contacts =  ContactsContract.Contacts.CONTENT_URI;

        // Form an array specifying which columns to return.
        String[] projection = new String[] {
                                     ContactsContract.Contacts._ID,
 
ContactsContract.Contacts.DISPLAY_NAME
                                  };

        // Make the query.

        Cursor peopleCursor = ctx.getContentResolver().query(contacts,
                                 projection, // Which columns to return
                                 null,       // Which rows to return (all
rows)
                                 null,       // Selection arguments
(none)
                                 // Put the results in ascending order by
name
                                 ContactsContract.Contacts.DISPLAY_NAME +
" ASC");


However.. what I don't understand is that my list shows far more
contacts than would appear than when I invoke the contact picker
Intent,

 i.e. Intent i  = new
Intent(Intent.ACTION_PICK,ContactsContract.Contacts.CONTENT_URI)

So really has anyone any idea why they both retrieve different data
even though I'm using the same Uri?


Thanks,

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to