Why the handler of a ContentObserver called before the changes
completed to contacts database?
I can’t find any workaround. Is it desired behaviour or bug?

I hope to get an answer.

On Oct 2, 1:53 pm, Yalcin <[EMAIL PROTECTED]> wrote:
> Hi,
> I want to check new entries, that made to contacts database. As
> example the "notes" column entry in "people" table.
> I register a ContentObserver and implement the handler, which is
> invoked on onChange method of ContactsChangeObserver.
>
> hier is a code snipped:
>
> +++
> ContentObserver myObserver = new ContactsChangeObserver();
> ContentResolver resolver = getContentResolver();
>
> resolver.registerContentObserver(Contacts.People.CONTENT_URI,
> notifyForDescendents, myObserver);
> +++
>
> two cases on method           .registerContentObserver(.., true/
> false, ..);
> 1) notifyForDescendents=true
>    observer handler is invoked 3 times
>    first time column "notes" value is null
>    second and third time is set to proper edited value.
>
> 2) notifyForDescendents=false
>    observer handler invoked 1 time and column "notes" has value null.
>
> It seems, the database row in first invoke of handler are not
> completely written / committed.
> What is the solution to get the proper value in first invoke of
> handler?
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to