OpenSync is a Open Source CalDAV/CardDAV (Contacts and Calendars) Sync for Android.
its integrates natively in Android calendar/contact apps.
its a fork from opensource project DavDroid https://davdroid.bitfire.at/source/.
it has been tested with Nextcloud Server.
OpenSync Source code is at https://github.com/deependhulla/opensync and on https://deependhulla.com/android-apps/opensync-app
Its licensed under the GPLv3 License.