I have created an app in which I am getting the contacts from a device. But I want to remove the duplicate contacts from the results.
How could I do it?
If you want to get rid of duplicates, consider using a HashSet instead.
HashSet
If you can't/don't want to use it, simply check before adding whether the contact is already there.
if (!myList.contains(newContact)) myList.add(newContact);