I am writing an application that needs to know when a meeting is added/removed/changed in the calendar.
I know how to get all the data from a calendar using CursorLoader
on the calendar uri.
Also i know how to listen to calendar changes using the ContentObserver
.
The problem is that the ContentObserver.onChange(boolean selfChange, Uri uri)
does not provide information on the changed event. so the only way for me to know what the change was is to load again the entire calendar (or part of it) using the CursorLoader
and comparing the old with the new.
Is there a way to "register for changes" on the calendar and receive the events that were changed?
Unfortunately, there is no such option. I even went as far as to reflect the entire Bundle which came with that Intent - nothing. IMHO, some surfaces of the Android API are quite lacking, this is just one of these instances, I guess.