Understand that you have to go to the caldav item and click on it before the calendar appears in the calendar app. How do I enable it by default without having to click on it? Any where in the code that I can modify to do so?
Thanks to a very nice person we met at Nextcloud conf 2017 we were able to personally take some important screenshots from a Xiaomi device and managed to find out what you need to do to get DAVdroid working with Xiaomi devices. Please have a look at these screenshots and on the colorized sections (stuff that belongs together is colored (orange, blue and pink) the same way).
Don’t forget to also remove your battery restrictions (if you want DAVdroid to sync automatically):