gggard/AndroidCaldavSyncAdapater

Double entries

Closed this issue · 4 comments

I sync my HTC One M8 with my owncloud. My phone always shows every calendar entry twice but is only once in my owncloud calendar

I now also tried it with my Samsung Galaxy Note Edge and got the same problem.

Riin commented

Same here with Samsung Galaxy S4 mini and Android 4.4

Same issue with SabreDav and tested with Samsung Galaxy Note 3 and Samsung Galaxy S3

diciu commented

This is likely caused by the fact that AndroidCaldavSyncAdapater does not expect the server to create the calendar object resource at a different URL.

I.e. the CalDAV client says:
PUT /Calendar/clientid.ics
but the server saves the calendar object under URL /Calendar/x_y_z.

Later on, when SyncAdapter REPORTS on the Calendar resource it keeps both clientid.ics and x_y_z, duplicating the original event (although they share the ETAG and UID, neither of which should be duplicated in a collection).

The CalDAV client should not expect the server to use the URL it specified when executing the PUT request; in fact, the server can set the Location header to indicate the server URL for the newly created event as part of the 201 created response.