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?
Add the following checking in the place of list.add(new ProfileBean(name, phoneNumber)); before adding into list:
list.add(new ProfileBean(name, phoneNumber));
int flag = 0 if(list.size() == 0){ list.add(new ProfileBean(name, phoneNumber)); } for(int i=0;i
}
} if(flag == 1){ list.add(new ProfileBean(name, phoneNumber)); }