android is CallLog.Calls._ID the same with the contact id?

吃可爱长大的小学妹 提交于 2019-12-10 19:17:56

问题


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

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


回答1:


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: https://stackoverflow.com/a/7374721/321354



来源:https://stackoverflow.com/questions/11778342/android-is-calllog-calls-id-the-same-with-the-contact-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!