title: Syncing with SQLite database and Android Calendar
body: <p>I have a rather complex question regarding syncing data between my application's <code>SQLite</code> database, a user's <code>Calendar</code>s, and a webserver.</p>
  <p>This is essentially the behavior I  need:</p>
  <p><code>onResume()</code>: <strong>Any modified <code>Event</code>s on any <code>Calendar</code> on any <code>Account</code> result in an update in my application's <code>SQLite</code> database.</strong> (only <code>Account</code>'s the user specifies, of course).</p>
  <p>What I'm doing write now is updating every entry in my <code>SQLite</code> database with each <code>Calendar</code> event, whether it's been updated or not in <code>onResume()</code>. This is, of course, not ideal.</p>
  <p>I'm already able to pull all events into my application's <code>SQLite</code> database, and sync between my database and my webserver. The main issue is syncing between my <code>SQLite</code> database and the <code>Calendar</code>. From <a href="http://developer.android.com/reference/android/provider/CalendarContract.Events.html" rel="nofollow noreferrer">my research</a>, I've read that you can only write to the <code>DIRTY</code> flag on a Calendar if you implement your own <code>SyncAdapter</code>. This would also require me to implement a <code>ContentProvider</code>, which I would like to avoid. So my questions are:</p>
  <ol>
  <li>Is there any reliable method for seeing modified <code>Calendar</code> events without implementing a SyncAdapter?</li>
  <li>If  not, is it garaunteed that I'll be able to maintain my own <code>DIRTY</code> flag for my application? I know Google uses the <code>DIRTY</code> flag to sync <code>Calendar</code>s with Google Calendar. If Google Calendar were to continuously set and reset this flag, it would not help me maintain my application.</li>
  <li>Is there a recommended design approach for this type of problem that I'm otherwise oblivious to? Such as another method to keep a &quot;last_modified&quot; type flag for each <code>Calendar Event</code>?</li>
  </ol>
  <p>Cheers.</p>
  <p><strong>Edit:</strong> I should also add that I'm targetting Android 4.0+ with the application now, but I would like to support all versions in the future.</p>