Android是CallLog.Calls._ID与接触ID一样吗? [英] android is CallLog.Calls._ID the same with the contact id?

查看:172
本文介绍了Android是CallLog.Calls._ID与接触ID一样吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个日志通话清单。我要的图片添加到安ImageView的每个联系人。我想问一下,如果

I created a log call list. I want to add the picture to each contact in ann imageview. I would like to ask if

Cursor managedCursor = managedQuery(CallLog.Calls.CONTENT_URI, null,
                null, null, "DATE DESC");
int id = managedCursor.getColumnIndex(CallLog.Calls._ID);

is the same with ContactsContract.Contacts._ID

如果这两者是不一样的我怎么能获得联系人正在使用managedCursor?

If this two are not the same how can I obtain the contact is using managedCursor?

推荐答案

没有事实并非如此。它是该行的刚的ID。
反正你可以阅读从 NUMBER 字段中的电话号码,并获得接触ID与此code:
http://stackoverflow.com/a/7374721/321354

No it isn't. It is just the ID of the row. Anyway you can read the phone number from the NUMBER field and obtain the contact id with this code: http://stackoverflow.com/a/7374721/321354

这篇关于Android是CallLog.Calls._ID与接触ID一样吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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