8

Android: Get unique contacts called from the call log

view full story
linux-howto

http://stackoverflow.com – Lets say that i have 100 calls in my call log. I want to find the unique contacts (not numbers) that they have been called. The problem is that if a contact has two phone numbers (e.g. for Contact A i have a number for home and another for mobile) i will count that contact twice! I tried the following. I am reading the call log. Then for each number of the call log i call the following custom function: private String getContactID (String number) { String contactID = ""; ContentResolver context = getContentResolver(); /// number is the phone number Uri lookupUri = Uri.withAp (HowTos)