Currently I am displaying all the contacts of my phone in my app as a custom recyclerview. Till now I am showing name, mobile number and profile image of the contact on the list item view but I need to get all the information for that contact and display it when the list item of my app is clicked in a custom detail page.
For each contact there is a different set of information available, like in few contacts I have email but for few contacts its not present.
My questions are
How can I get all the information of a given contact without missing a single bit.Is there a structure that I can traverse and check value for each key?
Also when I am populating the system contacts in my apps list, I find same contact multiple times in the list. I think this is due to the fact that in my device's account manager the same number is registered for many accounts like whatsapp, gmail. If so how to display that number only once in my list.