简体   繁体   English

如何从Android的通话记录中获取最常用的电话?

[英]How to get most frequently used calls from call log in android?

是否有任何方法或查询可以显示一个呼叫列表中显示的所有最常用呼叫记录?

Not that I know of. 从来没听说过。

You could create a wrapper for Log.d/w/e etc and have it keep track of the number of times it encounters each log, then you would be able to figure out the most frequently used calls by sorting your data. 您可以为Log.d / w / e等创建包装器,并使它跟踪遇到每个日志的次数,然后可以通过对数据进行排序来找出最常用的调用。

It's a clean way to do it, since you wouldn't need to change anything else. 这是一种干净的方法,因为您不需要更改任何其他内容。

I wanted this functionality before, but I found that in most cases if I restructured my log calls under conditional statements, I'd get what I wanted without the noise. 我以前曾想使用此功能,但是我发现,在大多数情况下,如果我在条件语句下重组日志调用,那么我会得到想要的东西而不会产生噪音。

You can also create some temporary gui elements in your app to display the same information, or even do away with your log calls and just increment integers in their positions, then do one big log call in the end to see which integer is incremented the most - ie: which log call would have been called the most in its place. 您还可以在应用程序中创建一些临时gui元素以显示相同的信息,甚至取消日志调用,只增加其位置的整数,然后最后进行一次大的日志调用,以查看哪个整数递增最多-即:哪个日志调用将在其位置被调用最多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM