Thanks for the response.
Here’s a summary of my setup, with further details below:
I’m importing ICS files received via email. I have two ICS files that I’m currently testing, one that creates the appointment (it contains a UID that doesn’t exist in the calendar), and one that updates the appointment (it contains the same UID as the previous ICS file). I import the first one successfully, but when the second one is imported, the UID of the event created when the first one was imported has changed.
It only occurs to me now that it’s possible Nextcloud is changing the UID. I poked through the source of DAVdroid and found LocalEvent.updateFileNameAndUID() - this led me to post here.
So, more details. Everybody loves details:
Nextcloud version: 11.0.1
DAVdroid version: 22.214.171.124-gplay
Android version: 7.1.1 (LineageOS 14.1 nightly)
DAVdroid debug info: http://paste.fedoraproject.org/551194/76849148/ (I’ve censored the private bits, I trust they aren’t important here).
I’ve pasted a couple of Java snippets. The first (http://paste.fedoraproject.org/551214/14865794/) is code that creates a calendar event with a UID. The second (http://paste.fedoraproject.org/551215/48657948/) should be run after DAVdroid syncs (only a few seconds in my case). Your test app will need the appropriate permission, of course: