Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CardDAV support for owncloud / sabredav plus external IMAP provider #81

Closed
wants to merge 26 commits into from

Conversation

arved
Copy link

@arved arved commented Jun 30, 2013

Based on the CardDAV code of ziirish there is an working CardDAV backend for owncloud / SabreDAV.
(see issue #80 / #76 / #47/ #71 )

to support my szenario there is a need to support external email provider with complete email address as loginname
Owncloud, can not handle Email adresses as usernamens. To use PHP-Push-2 in this requirement I've added some code

arved added 5 commits June 30, 2013 18:08
to use IMAP of 3rd party providers with, email address as login name
use 3rd party IMAP privider with email address as login name
changes to work with ownCloud on qnap agains Samsung Galaxy Note2
updated to work with owncloud 5.0.7 on qnap 4.0.1 with Samsung Galaxy Note 2
updated to work with owncloud 5.0.7 on qnap 4.0.1 with Samsung Galaxy Note 2

Signed-off-by: arved <[email protected]>
@magcks
Copy link

magcks commented Jul 9, 2013

Updates on contacts on my mobile phone are not syncing with ownCloud with your soulution.

@arved
Copy link
Author

arved commented Jul 10, 2013

can you give me more infromation about your Environment?
I've had a similar issue on a Galaxy Note 2. For unknown reasons the phone doesn't push calendar changes immediately. the ActiveSync Server does not "see" any requests regarding a contact update. After some time (about 10 min) or a reboot of the device the changes a anounced and synced.
Can you confirm this behavior?

@arved
Copy link
Author

arved commented Jul 10, 2013

second effect I cloud observe is: if you create a contact on the phone, after a sync cycle there are two indetical contacts. but one is only local. this seems to be a Problem in the WEBXML part, because the phone does not get back the Client ID of the entry after the contact is replicated. so the phone creates a new one, which ist merged with the old one. If you Change only the local contact changes are never replicated.

@magcks
Copy link

magcks commented Jul 10, 2013

Thanks for your reply.

I am using Android 4.2 (Cyanogenmod 10.1) on my Galaxy Nexus.

Before I've used PHP-Push-2 I tried oczpush (https://github.com/gza/oczpush) but I had Problems with the calendar sync on my Timezone (Europe/Berlin). There happened crazy things with it BUT the constact sync worked perfectly. So it think the problem is not the Phone.

Anyway Z-Push receives the changes: https://gist.github.com/justbrain/52e1faf4b025b29e8a0d (I changed the name of the contact from "Kai" to "Kaii" and added an organisation.)

Changes on device shoud now be replicated correctly
@arved
Copy link
Author

arved commented Jul 10, 2013

I have to do some more investigation on this, this may take some time

@magcks
Copy link

magcks commented Jul 10, 2013

I've just tested it:

  • If I create a new contact on my phone the contact will be synced successfully with ownCloud.
  • If I change this contact on owncloud it will not be synced with Android: Android syncs the old one with ownCloud so I have a new version of the contact and a old version in ownCloud and only the old version on Android.

Take your time :) Tanks for fixing it.

@magcks
Copy link

magcks commented Jul 10, 2013

Yeeeeaaah, I think it works with your last commit. Thank you veeeery much!

I have added some code (probably on the wrong method) to set the FN-section of VCard if it is empty (a better solution would be keeping the old one). This happens (with my phone) if I update the name of a contact. In ownCloud I see a empty string or "{name}" instead of the name ({name} seems to be the ownCloud representation for an empty name).

https://gist.github.com/justbrain/5967587

@magcks
Copy link

magcks commented Jul 10, 2013

I just found another bug: If a contact has multiple Groups a new group will be created on the phone ("Group1,Group2") instead of putting the contact the Group "Group1" and "Group2" separately.

@arved
Copy link
Author

arved commented Jul 10, 2013

should we move this discussion to this place https://github.com/arved/PHP-Push-2-owncloud/ ?
I've just created the two issues there.

@magcks
Copy link

magcks commented Jul 10, 2013

I think this is a good idea, because here we mix several issues into one.

magcks and others added 11 commits July 10, 2013 20:12
because of $type = strtolower(array_shift($fieldparts)); $types can never be "CATEGORIES"
added code by justbrain slightly adopted to the structure of the section to make things more readable
Using built in function to create FN, found in utils.php to use the FILEAS_ORDER Setting in config.php 
Introducing a new Switch to always override FN according to the Setting in config.php
Using built in function to create FN, found in utils.php to use the FILEAS_ORDER Setting in config.php 
Introducing a new Switch to always override FN according to the Setting in config.php
Android and ownCloud uses this format by default if you are creating a new contact.
@arved arved closed this Jul 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants