Support for instant messaging addresses

  • Currently, DAVdroid does not seem to support instant messaging addresses. This would be a great addition, as Xabber uses the address book for contacts. For XMPP addresses, this is stored as X-JABBER. OS X also supports X-AIM, X-MSN, X-YAHOO, X-YAHOO-ID (no idea what the difference is between those two; it stores it as both when you add a Yahoo address), and X-ICQ. Obviously X-JABBER is the one that matters most, or possibly even makes sense adding.

  • Hey.
    It seems as if you’ve elected to choose to support the IMPP type. From what I can see, the X-JABBER, X-AIM, etc. are more common. Both Address Book on OS X and Xabber on Android seem to be using that scheme. IMPP is the actual standard though, so I would understand if you chose to continue onward with that.

    IMPP is what ownCloud uses though, so I tried creating a contact in ownCloud’s web interface and adding an IM address. When I sync this with DAVdroid, it crashes. Here is the relevant part from the log:

    I/davdroid.SyncManager(26379): Updating 2de59c6cc9.vcf
    W/dalvikvm(26379): threadid=11: thread exiting with uncaught exception (group=0x41c16930)
    E/AndroidRuntime(26379): FATAL EXCEPTION: SyncAdapterThread-4
    E/AndroidRuntime(26379): java.lang.NullPointerException
    E/AndroidRuntime(26379):        at at.bitfire.davdroid.resource.LocalAddressBook.buildIMPP(
    E/AndroidRuntime(26379):        at at.bitfire.davdroid.resource.LocalAddressBook.addDataRows(
    E/AndroidRuntime(26379):        at at.bitfire.davdroid.resource.LocalCollection.updateByRemoteName(
    E/AndroidRuntime(26379):        at at.bitfire.davdroid.syncadapter.SyncManager.synchronize(
    E/AndroidRuntime(26379):        at at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(
    E/AndroidRuntime(26379):        at android.content.AbstractThreadedSyncAdapter$
    I/Process (26379): Sending signal. PID: 26379 SIG: 9
    I/ActivityManager( 2251): Process at.bitfire.davdroid:sync (pid 26379) has died.

    Here is the vCard that made it crash:

    PRODID:-//ownCloud//NONSGML Contacts 0.2.5//EN
    FN:test mctest

    Let me know if you want me to make an account on my OC server for you to test this out with.

  • “IMPP;TYPE=WORK;X-SERVICE-TYPE=jabber:test@test.tld”

    The IMPP value seems to be “test@test.tld”. It should be an URI, but it isn’t since it doesn’t have a scheme component.

  • The IMPP value seems to be “test@test.tld”. It should be an URI, but it isn’t since it doesn’t have a scheme component.

    I think you’re right. It seems like this might be ownCloud’s problem. Bizarrely, ownCloud allows you to choose both Jabber and XMPP. When I choose Jabber, the value is as shown above. If I choose XMPP, it ends up like this, which syncs fine with DAVdroid:
    If after choosing XMPP I go back to Jabber, it ends up like this, which is also valid and syncs with DAVdroid fine.

    Looks to me like this is an ownCloud issue, not a DAVdroid one. I guess the only question remaining is whether or not DAVdroid should crash when presented with an invalid IMPP value.

    On another note, it seems as if Apple Contacts now uses IMPP instead of the X-JABBER, etc. fields. Others seem to be adopting that too more and more, so I guess I retract my comment regarding X-JABBER, etc. earlier.

  • developer

    "IMPP;TYPE=WORK;X-SERVICE-TYPE=jabber:test@test.tld" means IMPP address “test@test.tld” but without scheme and so without IMPP protocol. Because DAVdroid compares the scheme values without checking for null values first, it crashes. I will fix this so that null values are handled properly (I wonder if I will accustom myself to Java one day).

    Can you please create an OwnCloud issue for this?

  • @rfc2822 Thank you very much for the fix. I was going to create an ownCloud issue, but I see you’ve already done so. I’ll copy some of the information from this issue into that so the OC developers can get the information in their own bug report.

Similar topics

  • 7
  • 4
  • 1