Dear Nikilesh, let the cursor retursn the duplicate value. you need to sort out to remove the duplicate.
Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. On Thu, Dec 29, 2011 at 12:38 AM, nikki <[email protected]> wrote: > Hi Group, > > Please help me, I am trying to read the native phonebook. I have used > " Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI,null, > null, null, ContactsContract.Contacts.DISPLAY_NAME + " COLLATE > LOCALIZED ASC");" to get all the contact ID. > > Based on the ID I am fetching other details like phone number, email > photo etc. > > The issue is on the devices whose phone books are synced with other > accounts as well( like gmail) I am getting duplicate entry for the > same contact in my application. The same contact name is repeated 4 5 > times. > > I have searched a lot but not able to find anything on it. > > > Thanks In Advance. > > > -- > 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 -- -- 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

