gggard / AndroidCaldavSyncAdapater

Caldav synch adapter for Android
246 stars 88 forks source link

Double entries #247

Closed ablackack closed 4 years ago

ablackack commented 8 years ago

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

ablackack commented 8 years ago

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

Riin commented 8 years ago

Same here with Samsung Galaxy S4 mini and Android 4.4

gerd87 commented 8 years ago

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

diciu commented 8 years ago

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.