Reputation: 8435
I am trying to access call logs in android application , here i am getting all call details but i want unique call details only , i don't want repeated values.
is there any way to get unique call log details in android ?
Upvotes: 1
Views: 457
Reputation: 50548
Get all call details and add them in Set
. Set does not allow dupes.
Idea and guess:
If you are extracting each detail differently you might find easier to use Map
and then add the keySet()
to the Set
data and then again you populate the map.
Remember in CallLog you might find same key (let's say Contact name) but different data for that call (Time, duration etc etc).
Upvotes: 1