6. WebDAV-Push

By default, DAVx⁵ has to query the server in fixed intervals to see whether there is new data to be loaded. This is inconvenient, as it can take a while before new data is available on the device.

Added in version 4.4.10: To solve this, we have developed WebDAV-Push so that DAVx⁵ can receive a notification from the server when new data is available.

Note

WebDAV-Push support is still experimental and subject of continuous improvement.

Push messages are always end-to-end encrypted so that push transports can’t read their content.

6.1. Server-side requirements

The server needs to support and be configured for WebDAV-Push.

Currently, there’s only an experimental implementation of WebDAV-Push for Nextcloud: nc_ext_dav_push. If you know of any other CalDAV/CardDAV server that supports WebDAV-Push or if you’re interested in implementing it for some server, please let us know.

You just need to install the dav_push extension on the Nextcloud server. However, due to the experimental nature of the app, it’s possible that the version in the app store is outdated or not working. In that case, you can fetch the latest source code directly from Github into the respective app directory.

Currently, the dav_push app doesn’t need any configuration. It automatically creates a VAPID server key.

6.2. DAVx⁵ requirements

You need DAVx⁵ version 4.4.10 or higher to use WebDAV-Push.

A UnifiedPush distributor or Google FCM (Google Play services) must be available on the device.

You need to choose the distributor you like to use from DAVx⁵ settings. Scroll to the bottom, and choose your distributor.

6.3. How to use

  1. Make sure your server supports WebDAV-Push (= install the dav_push extension on Nextcloud; fetch latest version from Github if Push doesn’t work).

  2. Select a distributor in DAVx⁵ settings.

  3. Refresh the collection list in the respective DAVx⁵ account (to fetch the respective WebDAV properties).

  4. Tap on a collection to view its details. It should say Server offers Push support when the collection is not selected for synchronization, or Push support: subscribed (at a date/time that is always more recent than about a day) when the collection is selected for synchronization.

  5. Make some change on a subscribed collection, for instance change/add an event. It doesn’t matter which client you use to do this. However for testing, we recommend to do it directy in the Nextcloud Web interface.

  6. Wait some seconds and watch your calendar on the DAVx⁵ device. The push notification should immediately arrive and the calendar should be updated within a few seconds. In case that DAVx⁵ doesn’t have the quota to synchronize in the background, it will show a notification.

6.4. Troubleshooting

If DAVx⁵ doesn’t subscribe or subscriptions became stale, because for instance the server has switched to a new VAPID key, you can manually reset the subscriptions:

  1. Open the DAVx⁵ app settings.

  2. Disable UnifiedPush support (deletes all subscriptions).

  3. Enable UnifiedPush support again. DAVx⁵ will create and register subscriptions again.