1

Am working on one of my requirement, halfway through am stuck on an issue. As per my requirement I need to know if any calendar event has been updated, say like any new participant is added or any event fields has been updated say Title,Description or location. As of now am able to know precisely if any event is added or deleted from system, but unfortunately am not able to detect out any update.

The same scenario goes to media, i need to know if any fields related to a media is changed, say name,title or parent folder/path etc.

to summaries my requirement is to know if any filed in Media or Calendar db is updated. to detect Insert or Delete am using Content Observers, as it only tells me something is changed by through onChange() call back, but it never tells you which rows was updated.

regards, techfist

Techfist
  • 4,314
  • 6
  • 22
  • 32

1 Answers1

0

I had a similar problem with the browser. I made use of shared preferences.

When I read the DB, I know that I have read all the entries until the time stored in shared preferences. So each time I read DB, I need to check for all the changes after the time that was stored in shared preferences and update the time in the shared preferences to current time. For code and my implementation can can look to my solution in Android History Content Observer

Community
  • 1
  • 1
Aditya
  • 5,509
  • 4
  • 31
  • 51