Great, thanks for your clarification!
I'm then also wondering how my sync adapter can know if a row was updated 
in the calendar provider?
Upon a change in the calendar, my sync adapter gets called by the calendar 
provider.
However, at the time onPerformSync(...) gets called all the rows in the 
calendar provider are set to DIRTY = 0
(this could be because Google sync set it to zero or other applications set 
it to zero).

So how can I find out if a row was recently inserted or updated, especially 
since there is no DATE_LAST_UPDATED column in the calendar provider?
Am I missing something?

Best regards,
Christopher

On Wednesday, November 14, 2012 6:58:02 PM UTC+1, Michael Chan wrote:
>
> Hi, 
>
> The SYNC_DATA* columns are reserved for the sync adapters to use.The 
> GoogleCalendarSyncAdapter can use it for any purpose and change the 
> usage whenever it wants. There's no standard convention.  If you are 
> using a sync adapter, use it in any way to fit your needs. 
>
> > how can I make sure another application doesn't use the very same 
> columns and they override each other? 
>
> There's no sure way. The CalendarProvider allows access to the 
> SYNC_DATA* columns only if the caller identifies itself as a sync 
> adapter. And in that case, they can only access rows that matches the 
> supplied ACCOUNT_NAME and an ACCOUNT_TYPE. This is to prevent 
> accidental access. It doesn't validate whether the caller is a sync 
> adapter or not. 
>
> http://developer.android.com/guide/topics/providers/calendar-provider.html#sync-adapter
>  
>
> Thanks, 
> Mike 
>
> On Mon, Nov 12, 2012 at 5:57 AM, Christopher Masser 
> <cma...@gmail.com<javascript:>> 
> wrote: 
> > CalendarContract.EventsColumns.SYNC_DATA1 - SYNCDATA10 are said to be 
> > columns of the content provider for use with sync adapters. Does anybody 
> > know if there is some convention for what is the use of these columns? 
> I've 
> > realized that on my device SYNC_DATA5 stores the date last modified and 
> > SYNC_DATA1 seems to store the Google event ID. So it seems whenever the 
> > Calendar app syncs with Google Calendar, these columns are modified. 
> > 
> > However, if I choose to use one of these columns for my sync adapter, 
> how 
> > can I make sure another application doesn't use the very same columns 
> and 
> > they override each other? 
> > 
> > If SYNC_DATA5 is ALWAYS used by Google Calendar to store the date last 
> > modified I would be fine with just using that for my sync logic, I just 
> need 
> > to be certain that this is a convention. 
> > 
>
>

-- 
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

Reply via email to