[Discussion] Why is contact syncing so . . . convoluted?

@denNorske, exactly. From what I understand, Nextcloud + DAVx5 create and use their own separate address book instead of using the local, default, built-in Android address book. Itā€™s completely distinct and doesnā€™t sync in any way. One of the first responses to this thread was that this is because of FOSS reasons, but the Nextcloud app is already using the API calls necessary for interfacing with the built-in Android address book, so . . . I still donā€™t see why this is an issue.

Sorry if Iā€™m getting snarky - I just feel like weā€™ve come full-circle and are back at the start of this whole post.

1 Like

This is how all Android accounts work. There is no single local address book. Just that the Android dialer and contacts app can read from all accounts.

1 Like

How come apps like Facebook, LinkedIn, Gmail alternatives, etc. all access my primary Android/Google contact list directly (and some of them, like mail clients, even update it)? Iā€™m pretty sure Facebook doesnā€™t use its own separate and empty-by-default contact list - it most definitely wants access to a userā€™s full list of contacts to enhance their ability to snoop.

Apps can ask for permission to read the accounts through the Android API. Nothing odd there.

If you look on my screenshot youā€™ll see many accounts. For example Nine for my work. Nine can see all my accounts contacts but will not copy my gmail, sim, davx5 or samsung contacts to my works server. Itā€™s the same with gmail, it does not copy my works contacts to my Google account. This is the intended behavior.

You can find many apps that sync contacts between accounts. Take a look at ā€œCopy Contactsā€ https://play.google.com/store/apps/details?id=com.alefsoft.copycontacco

However, I agree that some kind of native sync would be useful. Put a feature request on Github.

This would be a feature request for DAVx5, right?

Both. 1) DAVx5 could include a cross-account sync and 2) Nextcloud client could implement it natively. Weā€™ve seen it can at least read and write all contacts as VCF files.

We are far from what we started to talk about. Syncing contacts and calendar should be more simple.

Like its own davx5 app. That will import the account from the files app like talk does. And by default adds calendars and a contact store in android.

For those that are paranoid on dont want contacts shared with android or ios they dont need that app. But for massive deployment at companies, this is needed. Or an app that will read the qr code when adding an app password.

On android there are far to many steps involved that is not ā€œnextcloud likeā€ On ios its a bit more easy as you only add nextcloud as a dav store for contacts and then runs. But it could be a bit more automatic :slight_smile:

So on andorid we basically need a branded davx client that will import the account from the nextcloud app. Nothing else.

But davx5 does it already. Did you not see my screenshot?

1 Like

Yes. But if I would show that to some of my customers they would say no. Because it is not the same brand on it.

And it only preloads the URL, not the whole account.

This is a slightly separate topic. Youā€™re wanting SSO (the ability to auto-login to the Nextcloud instance/account currently on the phone) in DAVx5/a Nextcloud-branded DAV client.

Iā€™m wanting the ability for DAVx5/Nextcloud to access and read/write contact lists used by other apps on the phone instead of only its own contact list (i.e. update and sync my Google account contacts with Nextcloud).

1 Like

You know this is how Microsoft does it with office 365 on android, right. I guess they donā€™t have any customers either :smile:

So sure, as @summersab is saying. It would be nice with both integrated contacts and calendar as well as the ability to sync other accounts with Nextcloud through the app.

1 Like

Exactly - Iā€™d be happy to try to make a PoC app if someone could tell me what API calls to use (though it would be scrappy - as I said, Iā€™m no Android dev). I tried searching for how to access contacts from the address books of other apps, but I couldnā€™t figure out how to do it.

Alright, so, I managed to find some code that simply copies or moves contacts between accounts. It is very rough code, and as Iā€™ve said, Iā€™m not an Android developer - I donā€™t have any idea if this is doing proper validation or not:

What I would like to do is take something like this, combine it with DAVx5, and allow users to simply select the existing accounts they wants synced with Nextcloud. Then, the app does the rest:

  1. Creates new DAVx5 address books
  2. Copies contacts from existing accounts into the DAVx5 address books
  3. DAVx5 syncs the contacts with Nextcloud
  4. Vice-versa

No need to confuse users about the fact that all local apps have separate storage for contacts or any of that. They should just be able to specify what they want synced, and it should happen.

An alternative source of code may be ProtonMailā€™s app (which they will be open sourcing in the next few months). It has a setting which allows users to pull contacts from address books of existing apps on the phone. Thatā€™s it - itā€™s a single checkbox, and it does what it needs to do. Their code may do a better job of properly handling contact information than this project - just a thought.

If anyone is interested in helping, that would be great. I started looking at the DAVx5 code, but Iā€™ve never used Kotlin, and I shelved it after fighting for an hour to alter a simple default setting. So, I wouldnā€™t mind a little assistance.

Thanks!

2 Likes

Iā€™d like to put another possibility onto the table for consideration. Instead of trying to make a silk purse (nice Nextcloud contact syncing) out of a sowā€™s ear (Android, which will probably never care about CardDAV), how about the following?

  1. Buy a PinePhone, or Purism Librem 5.
  2. Ensure CardDAV works natively with Nextcloud in the contacts apps, in as straightforward a manner as possible. No man-in-the-middle protocol-conversion App like Davx5.
1 Like

Keep in mind that davx also does some pretty nice trick to ensure vCard compatibility.
Like matching the phonetic name to a different property, etc etc.
Because google still uses vCard but is not compliant to the rfc entirely. So If you end up using a simple dummy syncing method that basically just sync vCards as files, lots of the properties will not be compatible with Nextcloud because we ARE rfc compliant :wink:

3 Likes

But still, DavX5 causes this bug:

More of a nuisance, hopefully it can be fixed soon.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.