获得CallLog唯一呼叫细节 [英] get unique call details from CallLog

查看:176
本文介绍了获得CallLog唯一呼叫细节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图访​​问Android应用程序通话记录,在这里我得到的所有呼叫的详细信息,但我想唯一的呼叫细节而已,我不想重复的值。

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.

有没有什么办法让android系统中唯一的呼叫日志的详细信息?

is there any way to get unique call log details in android ?

推荐答案

获取所有的呼叫细节和设置添加。设置不允许愚弄。

Get all call details and add them in Set. Set does not allow dupes.

理念和猜测:
如果您抽取的每一个细节不同,你可能会发现更容易使用地图然后添加键设置()设置数据,然后再在填充地图。
记得在CallLog你可能会发现同一个密钥(假设联系人姓名),但该调用不同的数据(时间,持续时间等等等等)。

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).

这篇关于获得CallLog唯一呼叫细节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆