Saturday, December 25, 2010

Saving events to calendar (Galaxy Tab and Galaxy S)

I've had a problem with my application related with calendar sync with Google calendar. Events were being saved into the device's calendar but not synced with Google Calendar on Galaxy S and Galaxy Tab after Froyo update.

After getting a Galaxy Tab I could find that it is now needed to specify "_sync_account_type" when adding events to the calendar. An easy fix as this value can be retrieved from the calendar list of the calendar ContentProvider.

Sample code snippet:
ContentValues values = new ContentValues(); 
values.put("_sync_account_type", **put the retrieved account type here**);

1 comment:

andy said...

I have your product call log calendar. It has worked fine. I have Galaxy Note and now, it posts every text to calendar regardless of the setting. Why? it hasn't done this until recently. It is now posting them regardless of the setting. What can be done to fix this? something that was really good is suddenly really bad. Please let me know