Android - How to synchronize gmail calendars in davdroid 1.10.1.-gplay using caldav in android 6.0.1?

The current Google API / OAuth method is not supported by DAVdroid but it's still possible by using the deprecated format:

https://www.google.com/calendar/dav/[yourname]@gmail.com/events username password

Yet it requires the compromise Allow less secure apps: ON in the Google security settings.

However, delegates don't sync.

Tested on OnePlus 3t, Android 7.1.1, DAVdroid 1.10.1.1.


The solution is to select the

"login with URL and user name"

option in davdroid.

And then paste the full calendar option as specified in the second option of the caledar ID into the "Base URL":

<26 digit calendar id>@group.calendar.google.com

(For imported calendars that becomes: <32 digit calendar id>@IMPORT.calendar.google.com)

Into:

https://www.google.com/calendar/dav/<emailaddress>/events

at the <emailadress> part. Yielding:

https://www.google.com/calendar/dav/<26 digit calender id>@group.calendar.google.com/events

(For imported calendars that becomes: https://www.google.com/calendar/dav/<32 digit calender id>@IMPORT.calendar.google.com/events)

And filling in <youremail>@gmail.com and <yourpassword>.

Notes:

  1. When you click login on Davdroid it takes you to a screen where it displays your username, but there you should enter the Name of the calendar in stead.
  2. The only calendar for which this will not work is the Inherited/unremovable calendar attached to your gmail account.

I hope it helps anyone that does not want a complete gmail account in their android phone accessing all your phone data, but still wants to 2 synchronize their calendar app.

Conclusion: So the first part, about the ownership of the calendar is not relevant. It even works with shared calendars.

Note: If you enter the wrong password, it will not say 'invalid credentials' but simply:

No caldav service found

EDIT:

Here is an excel file that semi-automates the process of getting those Calendar base-urls and entering them in Davdroid, as it can be quite time consuming with 15+ different calendars.

https://github.com/a-t-0/PublicCodeLibrary/tree/master/VBA/Google%20Davdroid%20calendar%20app%20sync