4

I am trying to synchronize my calendars using caldav in davdroid, using the following account credentials:

"login with URL and user name"

Where the url is based on this google caldav-api guide on how to use caldav for apple and or thunderbird:

https://apidata.googleusercontent.com/caldav/v2/calid/user https://apidata.googleusercontent.com/caldav/v2/calid/events

Where calid is substituded by either my google calender id in form:

<26-character long calender id>

or

<26-character long calender id>@group.calendar.google.com

As found in the google calendar settings in:

https://calendar.google.com/calendar/r/settings/calendar/

I have tried entering the 4 combinations into davdroid and the peculiar thing is that it works for 1 calendar for which I am listed as owner in the https://calendar.google.com/calendar/r/settings/calendar/ link for that calendar, but it does not show the calendars in davdroid for calendars for which google calendar says it is "subscribed".

So I thought it could be a permissions-issue. So I made a new test calendar to check whether that was indeed the case. I ensured for that calendar, I was listed as "Owner". Added the calender with the above 4 options but it again did not show the calender.

After revisiting the test calendar, I noticed, this too was added as a subscription where I am listed not as

[email protected] (Owner)

But as:

[email protected] with a grayed out dropdown box with "make changes and manage sharing" next to it.

The synchronizing of the calender for which I am owner worked already before I enabled the google caldav api, but just to be sure I enabled the google caldav api. It did not affect the outcome of my attempts so far.

So the first step is to this problem is I think, how to create a calendar that lists me as owner, also after creation.

But the main question is a generalized procedure on describing a way to add a calendar to davdroid for a 2-way sync to which which my google account is subscribed, (for example a calendar that is shared by with me by another gmail account).

If you know how to do either the partial step, the generalized procedure, or spot an error in my attempt/approach please let me know, so I can adapt.

2 Answers 2

5

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.

2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .