Objective: To write a sync adapter that syncs Google calendar events with local android calendar (server to device - one way only).
Android Version: Froyo Debugging Steps: 1. A past non-recurring event (one month old) is read from Google Calendar 2. I insert it locally in android calendar (calendar entry that I created) 3. The event is inserted successfully in events table but the corresponding entry in instances table is not created 4. I update the calendarmetadata table values to mininstance=0 and maxinstance="event's end date in millis" (on command prompt through sqlite3 tool) 5. I again try inserting the same event locally 6. This time the event is inserted successfully in events table and the corresponding entry in instances table also gets created Looking at the CalendarProvider.java and Calendar.java source code and further probing revealed the following: 1. After I insert a row in Calendars table, the mininstance is set to today's date and maxinstance is set to some 7 or 15 days in future so e.g. if today is 19-Oct, creating a calendar entry and accessing the calendar agenda activity sets mininstance=19-Oct (in millis) and maxinstance=26-Oct (in millis). 2. In step # 3 above when the content provider inserts an event it looks at the mininstance and maxinstance values to expand and insert instances for the given event in instances table. Since the event start time lies before the mininstance value (since the event is one month old) the content provider doesn't create corresponding instances entry. Given that I cannot directly write to calendarmetadata and instances tables from my code how can I sync older events with my local calendar on android device for froyo version? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en