Is there no way to assign an object to a contact, android
I know how to retrieve, edit, or delet a contact from native contact list in android. I have certain task for each contact. I want when i click on the contact I want to know what is the task assigned to the object. Is there any way to assign any object to any contact. like we do setTag() and get Tag() for buttons or ImageView. I didnt 开发者_开发技巧find any way to assign the object to the contact.
Thanks
You can't assign a plain object to a Contact but you can set custom data fields. This is done by creating a new Mime Type. Check out this answer for the specifics: How to add custom data/field in contacts in android 2.0?
Once you've created you're custom Mime Type, you can add and retrieve data associated with this type for any of your contacts.
And you can store any data in own database and use the LOOKUP KEY as foreign key to contacts database.
精彩评论