ContactsContract.Contacts中的所有字段

简介:

ContactsContract.Contracts实现了4个接口,并从4个接口中,继承了不同的字段,一共有23个如下:

ContactsContract.Contacts.TIMES_CONTACTED = "times_contacted"

The number of times a contact has been contacted

ContactsContract.Contacts.CONTACT_STATUS = "contact_status"

Contact's latest status update.

ContactsContract.Contacts.CUSTOM_RINGTONE = "custom_ringtone"

URI for a custom ringtone associated with the contact. If null or missing, the default ringtone is used.

ContactsContract.Contacts.HAS_PHONE_NUMBER = "has_phone_number"

An indicator of whether this contact has at least one phone number. "1" if there is at least one phone number, "0" otherwise.

ContactsContract.Contacts.PHONETIC_NAME = "phonetic_name"

Pronunciation of the full name in the phonetic alphabet specified by PHONETIC_NAME_STYLE.

ContactsContract.Contacts.PHONETIC_NAME_STYLE = "phonetic_name_style"

The phonetic alphabet used to represent the PHONETIC_NAME. See PhoneticNameStyle.

ContactsContract.Contacts.CONTACT_STATUS_LABEL = "contact_status_label"

The resource ID of the label describing the source of contact status, e.g. "Google Talk". This resource is scoped by the CONTACT_STATUS_RES_PACKAGE.

ContactsContract.Contacts.LOOKUP_KEY = "lookup"

An opaque value that contains hints on how to find the contact if its row id changed as a result of a sync or aggregation.

ContactsContract.Contacts.CONTACT_STATUS_ICON = "contact_status_icon"

The resource ID of the icon for the source of contact status. This resource is scoped by the

CONTACT_STATUS_RES_PACKAGE.

ContactsContract.Contacts.LAST_TIME_CONTACTED = "last_time_contacted"

The last time a contact was contacted.

ContactsContract.Contacts.DISPLAY_NAME = "display_name"

The display name for the contact.

ContactsContract.Contacts.SORT_KEY_ALTERNATIVE = "sort_key_alt"

Sort key based on the alternative representation of the full name, DISPLAY_NAME_ALTERNATIVE. Thus for Western names, it is the one using the "family name first" format.

ContactsContract.Contacts.IN_VISIBLE_GROUP = "in_visible_group"

Lookup value that reflects the GROUP_VISIBLE state of any ContactsContract.CommonDataKinds.GroupMembership for this contact.

ContactsContract.Contacts._ID = "_id"

The unique ID for a row.

ContactsContract.Contacts.STARRED = "starred"

Is the contact starred?

ContactsContract.Contacts.SORT_KEY_PRIMARY = "sort_key"

Sort key that takes into account locale-based traditions for sorting names in address books.

ContactsContract.Contacts.DISPLAY_NAME_ALTERNATIVE = "display_name_alt"

An alternative representation of the display name, such as "family name first" instead of "given name first" for Western names. If an alternative is not available, the values should be the same as DISPLAY_NAME_PRIMARY

ContactsContract.Contacts.CONTACT_PRESENCE = "contact_presence"

Contact presence status. See ContactsContract.StatusUpdates for individual status definitions.

ContactsContract.Contacts.DISPLAY_NAME_SOURCE = "display_name_source"

The kind of data that is used as the display name for the contact, such as structured name or email address. See DisplayNameSources. TODO: convert DisplayNameSources to a link after it is un-hidden

ContactsContract.Contacts.CONTACT_STATUS_RES_PACKAGE = "contact_status_res_package"

The package containing resources for this status: label and icon.

ContactsContract.Contacts.CONTACT_STATUS_TIMESTAMP = "contact_status_ts"

The absolute time in milliseconds when the latest status was inserted/updated.

ContactsContract.Contacts.PHOTO_ID = "photo_id"

Reference to the row in the data table holding the photo.

ContactsContract.Contacts.SEND_TO_VOICEMAIL = "send_to_voicemail"

Whether the contact should always be sent to voicemail. If missing, defaults to false.

 

    listColumnNames()            

 
  1. private Uri contactUri = ContactsContract.Contacts.; 
  2.  
  3. ContentResolver resolver = this.getContentResolver(); 
  4.  
  5. Cursor cursor = resolver.query(contactUri, nullnullnullnull); 
  6.  
  7. int columnNumber = cursor.getColumnCount(); 
  8.  
  9. for(int i = 0; i < columnNumber; i++) 
  10.  
  11.     String temp = cursor.getColumnName(i); 
  12.  
  13.     Log.e("listColumnNames""" + i + "\t" + temp); 
  14.  
  15.     cursor.close(); 

 


本文转自sucre03 51CTO博客,原文链接:http://blog.51cto.com/sucre/772922,如需转载请自行联系原作者

相关文章
|
物联网 5G 调度
|
资源调度 前端开发
每个前端开发人员都必须知道的 8 个 React 组件库!【建议收藏】
每个前端开发人员都必须知道的 8 个 React 组件库!【建议收藏】
|
Android开发 数据格式 XML
深入理解Android 自定义attr Style styleable以及其应用
相信每一位从事Android开发的猿都遇到过需要自己去自定义View的需求,如果想通过xml指定一些我们自己需要的参数,就需要自己声明一个styleable,并在里面自己定义一些attr属性,这个过程相信大家都比较了解。当然,属性其实也不一定需要和View配合使用,比如我想通过一个Theme中的style对一个库进行一些简单参数的配置,这应该怎么做呢?我今天在封装一个库时
2513 0
|
存储 Shell Linux
Android系统 理解/sys/目录权限和UID和GID?
Android系统 理解/sys/目录权限和UID和GID?
1512 0
|
资源调度 分布式计算 JavaScript
npm 和 Yarn:一场关于包管理的战争(上)
npm 和 Yarn:一场关于包管理的战争(上)
npm 和 Yarn:一场关于包管理的战争(上)
|
XML Java Android开发
Android Studio App开发之通知渠道NotificationChannel及给华为、小米手机桌面应用添加消息数量角标实战(包括消息重要级别的设置 附源码)
Android Studio App开发之通知渠道NotificationChannel及给华为、小米手机桌面应用添加消息数量角标实战(包括消息重要级别的设置 附源码)
1459 0
|
Java C# Android开发
Xamarin.Android | 界面跳转到手机自带的自启动管理界面,引导用户将APP加入自启动
为了帮助用户在使用 APP 时提高其稳定性和使用体验,有时候我们需要让安卓手机的界面跳转到手机自带的自启动管理界面,以此来引导用户将 APP 加入自启动,确保应用程序在后台运行时不被系统杀死,从而保证应用程序服务的稳定性和可靠性。同时,这也可以提高用户的使用体验,使用户能够更好地享受应用程序的功能和服务。
986 0
Xamarin.Android | 界面跳转到手机自带的自启动管理界面,引导用户将APP加入自启动
|
定位技术 Android开发 芯片
Android 中获取LocationProvider的三种方法和获取定位信息
Android 中获取LocationProvider的三种方法和获取定位信息
1326 0
|
JSON Java 数据格式
HttpMediaTypeNotSupportedException: Content type ‘application.yml/json;charset=UTF-8‘ not supported
HttpMediaTypeNotSupportedException: Content type ‘application.yml/json;charset=UTF-8‘ not supported
492 0
|
SQL Java 关系型数据库
IDEA+Java+JSP+Mysql+Tomcat实现Web学校教材管理系统
IDEA+Java+JSP+Mysql+Tomcat实现Web学校教材管理系统
453 0
IDEA+Java+JSP+Mysql+Tomcat实现Web学校教材管理系统