I asked this question some time ago when I was just dipping my toes into Android programming, and I figured I'd share what I found for anyone who's curious. When I was following tutorials to implement a custom ContentProvider, I saw that notifyChange (Uri uri, ContentObserver observer)
was used after the update()
, insert()
and delete()
methods. Not really knowing anything, I also called notifyChange
in my ContentProvider. This led to problems like infinite sync loops that I just could not figure out. There is an overloaded method: notifyChange (Uri uri, ContentObserver observer, boolean syncToNetwork)
which I knew about then, but I could never figure out how to use it because my notifyChange
was being called in my ContentProvider. This was actually an easy fix. All I had to do was call notifyChange (uri, null, false)
not in my ContentProvider, but rather, after calling those methods through the ContentResolver getContentResolver().insert()
etc.
I hope this helps someone.