On Wed, Aug 25, 2010 at 1:10 AM, Vibhor Mahajan <mahajan.vib...@gmail.com> wrote: > My application maintains its own contact database(localcontacts.db). > This database is subset of Android phone contacts database (People or > ContactsContract).
That would seem to be a really bad idea. Duplicating data, beyond foreign keys, is generally frowned upon. > Kindly suggest the best way to do this task. AFAIK, the primary purpose of the ContactsContract API rework for Android 2.x was to allow you to blend in additional contact data from other sources, like Android does with Exchange and Facebook. I would recommend researching how you can integrate that way and become a part of the contacts subsystem: "A row in the ContactsContract.RawContacts table represents a set of data describing a person and associated with a single account (for example, one of the user's Gmail accounts)." Or, use ContactsContract.Data to associate your data with a contact: "A row in the ContactsContract.Data table can store any kind of personal data, such as a phone number or email addresses. The set of data kinds that can be stored in this table is open-ended. There is a predefined set of common kinds, but any application can add its own data kinds." (both quotes from: http://developer.android.com/reference/android/provider/ContactsContract.html) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en