A (175)

(Tuis.) #1
CHAPTER 14: Android Content Providers: Providing Data to Applications 513

Table 14-2. ContactsContract databases in the Android provider package and the type of data that they contain


Database.Table Interface Database Table Contents
ContactsContract.BaseSyncColumns Generic columns used by sync adapters
ContactsContract.CommonDataKinds.BaseTypes All typed datatypes supported
ContactsContract.CommonDataKinds.
CommonColumns

Common columns across specific types

ContactsContract.ContactNameColumns Contact name and contact name metadata columns
in the RawContacts database
ContactsContract.ContactOptionsColumns Columns of ContactsContract.Contacts that track the
user preference for, or interaction with, the contact
ContactsContract.ContactsColumns Columns of ContactsContract.Contacts refer to
intrinsic contact properties
ContactsContract.ContactStatusColumns Data used for contact’s status info
ContactsContract.DataColumns Columns (joined) from the data table
ContactsContract.DataColumnsWithJoins Combines all Join Columns returned by
ContactsContract.Data table queries
ContactsContract.DisplayNameSources DataType used to produce display name
ContactsContract.FullNameStyle Constant for combining into full name
ContactsContract.GroupsColumns Data used for contact’s grouping info
ContactsContract.PhoneLookupColumns Data used for contact’s phone lookups
ContactsContract.PhoneticNameStyle Constants for pronunciation of a name
ContactsContract.PresenceColumns Additional datalink back to _ID entry
ContactsContract.RawContactsColumns Data used for the RawContact database
ContactsContract.SettingsColumns Data used for contact’s OS settings
ContactsContract.StatusColumns Data used for social status updates
ContactsContract.StreamItemPhotosColumns Columns in the StreamItemPhotos table
ContactsContract.StreamItemsColumns Data columns in the StreamItems table

All of these Contact related database tables replace the deprecated versions listed in Table 14-1.
If you want to look into these data tables in greater detail, detailed descriptions of these are available
from the Android developer site at this link:


http://developer.android.com/reference/android/provider/package-summary.html


As you can see in Table 14-2, the ContactsContract database table structure is an order of
magnitude more complex than the simple Contacts database table structure that was used prior to
Android 2.1. With this complexity comes power and flexibility, but at the cost of more complex Java
code needed to implement these databases and their features in your Android applications. This is a
complex topic for the Absolute Beginner!

Free download pdf