zl程序教程

您现在的位置是:首页 >  移动开发

当前栏目

Android API之android.provider.ContactsContract

AndroidAPI Provider
2023-09-14 08:58:31 时间

android.provider.ContactsContract

ContactsContract是联系人provider和app的contract。定义了已支持的URL和column。取代了之前的Contacts。

Overview

ContactsContract定义了有关联系人信息的可扩展的数据库。Contact信息保存为三层数据模型:

1. Data表保存了任何类型的个人数据。例如:电话号码、email地址等。存在Data表中的数据类型集是开放的(无限制的)。提供了常用数据类型集。任何app能添加自己的数据类型。

2. RawContacts表中的数据集描述一个人和这个人的一个帐户。(例如:用户的Gmail帐户)。

3. Contacts表呈现描述同一个人的一个或多个RawContas的聚合数据。当RawContacts表中的数据或与其相关的数据发生变化时,Contacts中的数据可能也会发生变化。

其他表:

Other tables include:

  • Groups, which contains information about raw contact groups such as Gmail contact groups. The current API does not support the notion of groups spanning multiple accounts.
  • StatusUpdates, which contains social status updates including IM availability.
  • AggregationExceptions, which is used for manual aggregation and disaggregation of raw contacts
  • Settings, which contains visibility and sync settings for accounts and groups.
  • SyncState, which contains free-form data maintained on behalf of sync adapters
  • PhoneLookup, which is used for quick caller-ID lookup