Hi, Any comment on this. I am still facing this issue. On debugging I found that the duplication is becuse of the linked contacts. My contact book is linked with multiple accounts(gmail, facebook etc). When I read the contact I get multiple contacts with same display name but different _id.
Please suggest. Thanks On Thu, Dec 29, 2011 at 1:06 PM, Mukesh Srivastav <mukicha...@gmail.com>wrote: > you need to find with the cursor and get the id and then use the delete > operation. this is what i did. > > some thing like cursor.delete. > > > Warm Regards, > *Mukesh Kumar*, > Android Consultant/Freelancer, > India,Hyderabad. > > On Thu, Dec 29, 2011 at 12:58 PM, nikhilesh singh tak < > nikhileshsingh...@gmail.com> wrote: > >> @ mukesh thanks for the replay... >> >> But what will be the criteria to remove the duplicate entires from the >> cursor. >> >> >> On Thu, Dec 29, 2011 at 10:42 AM, Mukesh Srivastav >> <mukicha...@gmail.com>wrote: >> >>> 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 <nikhileshsingh...@gmail.com>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 >>>> android-developers@googlegroups.com >>>> To unsubscribe from this group, send email to >>>> android-developers+unsubscr...@googlegroups.com >>>> 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 android-developers@googlegroups.com >>> To unsubscribe from this group, send email to >>> android-developers+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >> >> >> >> >> -- >> Nikhilesh Singh Tak >> >> +91-9754070871 >> +91-9929098279 >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> 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 android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Nikhilesh Singh Tak +91-9754070871 +91-9929098279 -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en