Earlier today we released the Android 2.0 SDK, which has a much-improved contacts API:
http://d.android.com/reference/android/provider/ContactsContract.html Each "Data" row has 15 fields that can be used to store generic data, and the Data.MIMETYPE column can be used to identify the contents of a given row. If you're storing contact data, you should definitely try to leverage the existing CommonDataKinds, since most UI will understand how to render them. If you need to store custom data, just allocate a unique MIME-type. For example, something like "vnd.edu.example.cursor.item/contact_class" would work. j On Fri, Oct 9, 2009 at 10:09 AM, Sarab <[email protected]> wrote: > > Dear Fellow Developers, > > I would like to request your comments on : How to add new field(s) in > to android's contacts.db database ? > > After going through existing discussion on this topic; I could find > that the deveopers recommend creating a new database for the new > fields and simultaneously provide a custom contacts content provider. > This custom content provider will join SQl queries from the new > databse and contacts.db.The id field being the link between the > contacts database and new databse.Pls see the link. > > http://groups.google.com/group/android-developers/browse_thread/thread/19de2b2ac8640b4c/9e4d1f9723831875?lnk=gst&q=contacts+extension#9e4d1f9723831875 > > So I have following queries : > > 1. Is any simpler way out for this problem. Since the thread is quite > old; I was wondering whether google provided any new API , interface > to sort this problem? > > 2. Can someone explain me the purpose of Contacts.Extensions and > Contacts.People.Extensions. I guess these are for extending contact > fields but not much information is available online. > > 3. If the above classes serves the purpose of extending the contacts > database (i.e. add field columns) , then Do i need to modify standard > contacts content provider for retrieving my custom field's data? > > > Many Thanks > > > > -- Jeff Sharkey [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

