ContentObservers are useless

359 views Asked by At

I'd love to be able to understand when a SPECIFIC item in the SMS or Call Log is changed. It's pretty easy to get notified when something changes in the appropriate content provider, but getting to the specific record is totally inefficient as one needs to maintain a total mirror image of the store and then figure out the diff. This is not only lame. What use is a notifcation for "oh something has changed in this table of 800 items, but we'll leave it to you to figure out not just the item, but the actual attribute/attributes for that item that have changed."

Perhaps someone smarter than me can tell me how to get notifed when a SPECIFIC call log, sms or contact record has changed. I'd love to know when the contact provider gets an update for a display_name. Or when a contact has been marked as a 'favorite'.

I'd like to know how to detect/get notifide when the contacts provider gets an update for a display_name or some other attribute such as 'favorite'. My service is interested in these changes as it will do something in response to these kinds of changes.

1

There are 1 answers

0
Sukumar On

ContentObservers cannot be notified for SPECIFIC item in the SMS or Call Log.

The only way to get notification for SPECIFIC item is to make changes in SMS or Call Log ContentProvider code to nofifyChanges for individual Item using ( ContentResolver.notifyChange ).