I have an app that inserts calendar events into Android calendars using the provider content://com.android.calendar/events
(for Android 2.2, else it is content://calendar/events
).
This works fine usually, and on my Nexus One the events are added and synced correctly up to Google Calendar.
On the Galaxy S however, new events added to a Google Account calendar appear correctly on the phone, but do not sync back to Google Calendar. Even after forcing a sync to occur in phone settings, the new event does not appear in Google Calendar (viewed from the web).
Whereas on the same phone a new event added to the same Google calendar using the built-in Samsung calendar app does get synced up to Google Calendar.
Does anyone know how I can get the new events to sync to Google from a Galaxy S?
Some code: my actual inserts are done like this:
Builder b = ContentProviderOperation.newInsert("content://com.android.calendar/events").withValues(values);
ops.add(b.build());
getContentResolver().applyBatch("com.android.calendar", ops);
This is similar to how the stock Android calendar app does inserts, as seen in the AOSP EditEvent class.