Multiple calendars with a single account



  • After buying DAVdroid, I entered my account data (login via URL and user name). I got my calendar, plus 3 other calendars that I have been given access to.

    Last week, I did a rescan, since there are more than 3 calendars I have access to. I thougt the number of accessible calendars would increase. It did not - now I only see my own calendar, and all other calendars disappeared.

    How can I get the 10+ calendars I see at the office into DAVdroid? The server is running an Oracle Communications Suite.

    Werner


  • developer

    Last week, I did a rescan, since there are more than 3 calendars I have access to. I thougt the number of accessible calendars would increase.

    You're right, this is what normally happens. It works in our tests, but we haven't tested this with Oracle UCS yet.

    It did not - now I only see my own calendar, and all other calendars disappeared.

    Remote calendars are only removed from the devices when you refresh the list and the server responds with 404 for their URL.

    Did you try to create the account again?

    Otherwise, please have a look at the debug logs while refreshing the calendar list. They contain verbose information about all requests and operations.



  • Yes, I deleted and recreated the account several times yesterday.

    I used various forms of the URL, like https://server/dav/, https://server/dav/home/, https://server/dav/home/myuser/, https://server/dav/home/myuser/calendar/, https://server/dav/home/mymailaddress, https://server/dav/home/mymailaddress/calendar/ - the result was always the same, up came my calandar and nothing else.

    Luckily, only minutes after I posted here, our mail admin came along, and he didn't find a reason at all. He says that normally all calendars I'm entitled for will show up, and showed me the list on his Android phone.

    We tried to add an account with URL https://server/dav/home/otheruser/calendar/ (and my username and password), and all we got was my own calendar.

    We also tried to add a second calendar to my account, and this second calendar shows up in DAVdroid, too. But no calendars of other users.



  • This is the debug info:

    --- BEGIN DEBUG INFO ---
    
    SOFTWARE INFORMATION
    Package: at.bitfire.davdroid
    Version: 1.10.1.1-gplay (206) from 20.01.2018
    Installed from: com.android.vending
    JB Workaround installed: no
    
    CONNECTIVITY (at the moment)
    Active connection: WiFi, CONNECTED
    
    CONFIGURATION
    Power saving disabled: no
    android.permission.READ_CONTACTS permission: granted
    android.permission.WRITE_CONTACTS permission: granted
    android.permission.READ_CALENDAR permission: granted
    android.permission.WRITE_CALENDAR permission: granted
    org.dmfs.permission.READ_TASKS permission: denied
    org.dmfs.permission.WRITE_TASKS permission: denied
    System-wide synchronization: automatically
    Account: mymail@mydomain
      Address book sync. interval: —
      Calendar     sync. interval: 240 min
      OpenTasks    sync. interval: —
      WiFi only: false
      [CardDAV] Contact group method: GROUP_VCARDS
      [CalDAV] Time range (past days): 90
               Manage calendar colors: true
    
    SQLITE DUMP
    android_metadata
    	|  locale |
    	|  de_DE |
    ----------
    services
    	|  _id | accountName | service | principal |
    	|  9 | mymail@mydomain | caldav | https://calendar.mydomain/dav/principals/mymail@mydomain/ |
    ----------
    sqlite_sequence
    	|  name | seq |
    	|  services | 9 |
    	|  collections | 45 |
    	|  homesets | 23 |
    ----------
    homesets
    	|  _id | serviceID | url |
    	|  23 | 9 | https://calendar.mydomain/dav/home/mymail@mydomain/ |
    ----------
    collections
    	|  _id | serviceID | type | url | readOnly | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | source | sync |
    	|  44 | 9 | CALENDAR | https://calendar.mydomain/dav/home/mymail@mydomain/1516630021692-46306/ | 0 | 0 | aucheiner | auch ein Kalender | <null> | <null> | 1 | 1 | <null> | 0 |
    	|  45 | 9 | CALENDAR | https://calendar.mydomain/dav/home/mymail@mydomain/calendar/ | 0 | 0 | Werner Flamme | <null> | <null> | <null> | 1 | 1 | <null> | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 7.1.2 (TOS373K - N2G48B)
    Device: Wileyfox Wileyfox Swift (crackling)
    
    --- END DEBUG INFO ---
    

  • developer

    @wernerflamme Thanks for the debug info. Here, DAVdroid has found only two calendars in the homeset. Can you check whether the homeset and collection URLs are correct?

    To see whether the other ones have been transmitted by the CalDAV server, you would have to turn on verbose logging while refreshing the calendar list in DAVdroid.

    Are you sure the server sends the calendar entries?

    If you can provide a test account (play@bitfire.at), I could also have a look.



  • Thank you for explaining ☺

    Looking at the output of adb shell content query --uri content://com.android.calendar/calendars, I see four calendars on my phone:

    The latter is absolutely correct, I use the same URL in Thunderbird too. But when I replace mymail@mydomain by othermail@mydomain, I still get my own calendar, what is something the mail admin did not see yet.

    How can I be sure what data is sent to get the collections? I didn't yet look at the code to find the query so that I can look at the server's answer. But the server should send the calendar entries, since a) there is a web front end for looking at the calendars (by Oracle), and b) in Thunderbird I can use the "CALDAV - search/subscribe" AddOn to search for calendars that I am allowed to look at.

    I'll show the debug log to the mail admin, maybe he knows how to get answers from his most beloved 🤦 host.



  • Now I did the complete tour: delete the account, remove the DAVdroid app, reboot the phone, reinstall DAVdroid, recreate the account.
    This time, DAVdroid requested the installation of the OpenTasks app, which I did. And it asked for more Permission than only calendars, so that my hope grew.
    Alas, after creating the account, I still only see my 2 own calendars, but not any calendar from my colleagues.



  • OK, found the external file in /storage/emulated/0/Android/data/at.bitfire.davdroid/files/ and succeeded in downloading it.
    In the first lines I see

    2018-01-23 14:48:07 638 [syncadapter.SyncAdapterService] org.dmfs.tasks sync of Account {name=mymail@mydomain, type=bitfire.at.davdroid} has been initiated
            PARAMETER #0 = upload
    2018-01-23 14:48:07 638 [AccountSettings] Account mymail@mydomain has version 8, current version: 8
    2018-01-23 14:48:07 638 [syncadapter.TasksSyncAdapterService] Adding local task list
            PARAMETER #0 = CollectionInfo(url=https://calendar.mydomain/dav/home/mymail@mydomain/1516630021692-46306/, id=3, serviceID=1, type=CALENDAR, readOnly=false, forceReadOnly=false, displayName=aucheiner, description=auch ein Kalender, color=null, timeZone=null, supportsVEVENT=true, supportsVTODO=true, selected=true, source=null, confirmed=false)
    2018-01-23 14:48:07 638 [AndroidTaskList] Creating local task list: list_access_level=0 list_name=aucheiner _sync_id=https://calendar.mydomain/dav/home/mymail@mydomain/1516630021692-46306/ visible=1 account_type=bitfire.at.davdroid list_color=-3937682 list_owner=mymail@mydomain sync_enabled=1 account_name=mymail@mydomain
    2018-01-23 14:48:07 638 [syncadapter.TasksSyncAdapterService] Adding local task list
            PARAMETER #0 = CollectionInfo(url=https://calendar.mydomain/dav/home/mymail@mydomain/calendar/, id=4, serviceID=1, type=CALENDAR, readOnly=false, forceReadOnly=false, displayName=Werner Flamme, description=null, color=null, timeZone=null, supportsVEVENT=true, supportsVTODO=true, selected=true, source=null, confirmed=false)
    2018-01-23 14:48:07 638 [AndroidTaskList] Creating local task list: list_access_level=0 list_name=Werner Flamme _sync_id=https://calendar.mydomain/dav/home/mymail@mydomain/calendar/ visible=1 account_type=bitfire.at.davdroid list_color=-3937682 list_owner=mymail@mydomain sync_enabled=1 account_name=mymail@mydomain
    2018-01-23 14:48:07 638 [syncadapter.TasksSyncAdapterService] Synchronizing task list #5 [https://calendar.mydomain/dav/home/mymail@mydomain/calendar/]
    
    

    I do not see the part between "Account has been initiated" and the construction of the URLs, so I still don't know how this is put together.