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


Question

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.


Answer

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


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes