我想读我加入与谷歌的联系,我的联系人的字段。结果我知道,这些领域获得同步的,因为我可以用另一种接触查看器应用程序看到它。 - >联系查看由SoftWyer结果我怎么可以查询这些数据?
在此先感谢!
解决方案 ContentResolver的CR = getContentResolver();字符串选择= ContactsContract.Data.MIMETYPE +=? ;的String [] = selectionParams新的String [] {vnd.com.google.cursor.item / contact_user_defined_field};光标tokenCur = cr.query(ContactsContract.Data.CONTENT_URI,空值,选择,selectionParams,空值);
I'm trying to read the fields which I added with google contacts to my contacts. I know that these fields get synced, because i can see it with an alternative contact viewer app. ->Contact View by SoftWyer How could i query this data?
Thanks in advance!
解决方案ContentResolver cr = getContentResolver();
String selection = ContactsContract.Data.MIMETYPE + " = ?" ;
String[] selectionParams = new String[]
{"vnd.com.google.cursor.item/contact_user_defined_field"};
Cursor tokenCur = cr.query(
ContactsContract.Data.CONTENT_URI,
null,
selection ,
selectionParams ,
null);