Possibility of a custom Contacts field with a set list of values and Contacts lookup performance

Posted by areyling on Stack Overflow See other posts from Stack Overflow or by areyling
Published on 2010-05-28T12:18:35Z Indexed on 2010/05/28 12:22 UTC
Read the original article Hit count: 267

I'm pretty sure it's not viable to do what I'd like to based on some initial research, but I figured it couldn't hurt to ask the community of experts here in case someone knows a way.

I'd like to create a custom field for contacts that the user is able to edit from the main Contacts app; however, the user should only be allowed to select from a list of four specific values. A short list of string values would be ideal, but an int with a min/max range would suffice.

I'm interested in knowing if it's possible either way, but also wondering if it make sense to go this route performance wise. More specifically, would it be better to look up a contact (based on a phone number) each time a call or SMS message is received or better to store my own set of data (consisting of name, numbers, and the custom field) and just syncing contact info in a thread every so often? Or syncing contacts the first time the app is run and then registering for changes using ContentObserver?

Here is a similar question with an answer that explains how to add a custom field to a contact.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about android

Related posts about Performance