The intention of the notifications is to tell you something changed, not the details. Trying to accurately report details of each change is a lot more overhead and prevents significant optimizations like batching. This is very much there to serve things like the list views -- they want to know when something changes, and when that happens they will requery the information they care about from the content provider to update to a new snapshot of the state.
For a big example of why this is the case: when the system does a sync to a remote data source, it will do a series of edits on the local data to reflect additions, removals, and changes made in the back-end data. Trying to report accurate per-item updates after that is just a tremendous amount of work (if possible at all) that is of little use. Plus, trying to monitor such changes to end up with an accurate reflection of the actual data is very prone to errors that get you out of sync and unable to recover, so requerying the data is what we prefer be done. On Mon, Jun 15, 2009 at 5:02 PM, MannyNS <mr.greenfi...@yahoo.com> wrote: > > Sure, I am not really worried that someone would delete Kara Trace > from my address book, neither I said so (speaking of which - if > someone has a number, let me know), I am just trying to figure out how > to monitor the changes on an address book. I would like to have a log > of what has been changed in the native address book, and second, I > would like to have a synchronized copy of the address book that would > not depend on SQLite. I could extend it the way I want (e.g. add extra > info for each entry), I could add extra numbers that would be visible > only in my proprietary address book application, etc. So I am looking > for a nice way to synchronize two address books as soon as change > occurs. > > On Jun 16, 1:03 am, Marco Nelissen <marc...@android.com> wrote: > > On Mon, Jun 15, 2009 at 3:00 PM, MannyNS <mr.greenfi...@yahoo.com> > wrote: > > > > > > > > > Only if you had Kara Trace in your address book already. But if you > > > add it after you start monitoring, you need to query the whole > > > database to see if Kara has been added or not to your address book. > > > > I had assumed the person you are interested in would already be in your > > address book, otherwise how would you know that you want to play a sound > > when that person is removed from your contacts? > > > > And if she did, then you start monitoring of her. Imaging that you > > > > > have 10 different girls with name Kara Trace in your address book. > > > > How likely is that, really? > > > > Then you have to subscribe to 10 different URIs, and still to keep > > > > > monitoring if a new Kara Trace entry has been added to your address > > > book. Further, my application/service would have to subscribe to all > > > database changes, as someone may rename another contact and name her > > > Kara Trace. > > > Then, what if I want to add Sharon Valerii too? > > > The system will be overloaded with my observers, and the amount of > > > work is just... ridiculous. > > > > Yes, your examples would be a bit of work to implement. On the other > hand, > > they seem a little far fetched, and not something you'd want to do in > > practice, so why don't you tell us what you're actually trying to > > accomplish, and maybe we can find a better solution? > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---