Sync contact pictures



  • Is it possible to sync the profile pictures as well?
    My hoster for example can store pictures for contacts.


  • admin

    Currently syncing contact pictures (a small version) is supported by davdroid. we've however only tested it in one direction (create image on phone and sync it not otherwise). It works for me with radicale. But we didn't have the time to test this with other servers/providers. Do you create profile pictures on your server? Which one do you use?



  • For me it only works if I upload the pic on the server (posteo.de) and sync the phone with it.
    I also tried it from phone to server but in that case it shows a blank picture. Not the native one by server, but just white.


  • developer

    Please test with current master or 0.3.7 as soon as it's released



  • has this been fixed? I'm syncing contacts with DavDroid 0.5.11 (on Android 4.3.1) to a baikal server and no photos are included. The exported vcf file written by android (of course) contains the according "PHOTO;ENCODING=BASE64;JPEG:" field, while there is no such field in the "http-outgoing" messages shown by adb-logcat during a davdroid sync for the same contact.


  • developer

    has this been fixed? I'm syncing contacts with DavDroid 0.5.11 (on Android 4.3.1) to a baikal server and no photos are included. The exported vcf file written by android (of course) contains the according "PHOTO;ENCODING=BASE64;JPEG:" field, while there is no such field in the "http-outgoing" messages shown by adb-logcat during a davdroid sync for the same contact.

    Yes this, has been fixed and works here. Please create a new issue with steps to reproduce and provide log output.



  • At first I found out, that android 4.3.1 doesn't seem to export vcards correctly. It put "PHOTO;ENCODING=BASE64;JPEG:" where it should have put "PHOTO;JPEG;ENCODING=BASE64:" so photos weren't imported correctly. This has been fixed with a ```sed -i 's/ENCODING=BASE64;JPEG/JPEG;ENCODING=BASE64/g' 00001.vcf````. This wasn't a fault of davdroid, I just mention it for the record.

    To reproduce the davdroid bug, follow these steps:

    1. Import test vcard https://gist.github.com/rigid/9983590 into DavDROID account
    2. Sync
    3. Get java.io.FileNotFoundException: No photo file found for ID 0 (full log: https://gist.github.com/rigid/9983670 )
      Maybe it's important to note that "ID" is always "0", even when importing multiple contacts.

  • developer

    1. This is a VCard version 2.1. CardDAV requires VCard 3. – So my CardDAV server doesn't even work with this VCard (have just tried it).
    2. The "No photo found for file ID 0" is normal and means that DAVdroid couldn't find a high-res photo in the Android contacts database that could be put into the VCard.
    3. When I put the PHOTO line into this VCard (3) on the server:
    BEGIN:VCARD
    VERSION:3.0
    UID:4e3e9d10-d7f5-42e0-8d9d-8c51254755dd
    FN:Maa Maa
    N:Maa;Maa;;;
    PRODID:DAVdroid/0.5.11-alpha (ez-vcard/0.9.3)
    REV:20140404T215930Z
    X-RADICALE-NAME:4e3e9d10-d7f5-42e0-8d9d-8c51254755dd.vcf
    PHOTO;JPEG;ENCODING=BASE64:/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwM
     EAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/
     2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUF
     BQUFBQUFBQUFBQUFBT/wAARCABgAGADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAA
     ECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaE
     II0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZn
     aGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJy
     tLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAw
     QFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobH
     BCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hp
     anN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0
     tPU1dbX2Nna4uPk5ebn6Onq8vP09f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wOTwOTg7uu6v46uYrg6nqrxx
     /NFcwFYYrYDYsjqSAEYbXXdliMHByM5+czDNI45RpqNl263/AB2/U+gwOSVqEnOrJL5/8MfH/
     wAS/wBoSb4r+PIvFXiOxt9ft55Hs/DHheW5WCG1g3sI5LnY2STIELqzKX5GVTZt4q70bx98Wb
     uG81nUwttKojWdwgRohlf3SoBkdctwrnLZYncfcfG37QPxS+IupWdl4Elv3SGSRLe5Mrx3cLA
     FHaNYpfLjXJfBQH5FB3DdtHoHwM+F2seAbKaLXLKxj12CwiltzEcx2zsWUKq9F6BvlHG716+x
     WzGnl2HVX2cYz6K6bS9Onm9b9TlwGRzx+IdOpOUqdrtpNKXze/ktl06nlPhf9gq/121TULsva
     2xUNud/LRlwR8sfzvn6uPy4r0b4afs2+FtD8KeNtKnsne8n8uzaZS2XiIJ+XcSAQdrA99w4OO
     LGleF/iFp3xBnaLwXZPa3cmZdaieIXBOT+9Z/LR1YZJJVyQT8rMQCewu/El14R1u8iuIpLuW5
     eCPfBDvDzqpzubjoAh4/vngCvlsdmuY148ntb3s0otdHfo/wdvQ+ow2SZfBtxp2s2veT7f3lr
     6q/qflRrmnLpGs39isvnrbTvCJdu3eFYjOO2cVSr3T9sLwPa+Fvik2p6dZPZWOuQ/bXjwdkd1
     vYToD67sOR28wdOg8Lr9Mw1ZYijCtHaSTPy6tSlQqSpS3i7fcez/syeH9K1TW9Zv9Rtku5dOt
     0lgjkUMqsX++QfTHXtXu+reKLq9Xyo7iSJFGFGSCB6e3P+eK+S/hp46uPAPiWPUIizW8qG3uo
     l/wCWkTEbh+GMj6V9G2EtjriR3dtdvLaTASL5bbQw+h59QfTnpXh5hh+asq1TVLbrZn7p4e5h
     RjgquCoxSrOV29FJxaXXeye6W1/M6vRfjFqXgTRru6ksrnV9Ih+Zx8zGJsgAKxOF5I4OBzxiv
     HviX+2H4p8U31umhD+wLG1YOnlPmWRueWI479OfrXuWnHTI9Dm01rWB7KZf3kEi71kyOd2euQ
     Px+teX+Pf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5p3f3dDwC2iF3fqbmV5rmXc7ySHLOxPUk+p
     5/wDr12UNiltsBIVjjI9Px/CuGmgurHWLiW5gltbi2kNtNbzjEkTA4II7EHgj612/h/Ube4RY
     pCrE4wMdfTivFzCE1ZrVdT99yPGUq2G9yy7ecejMTxuy21nY3LhE8q5iHBHRiUP1+979vSvXP
     Ang3RvENhp8trqMV+QY477TZg4dIz99o9pyxGBjjtjPHPmfjdbZPD188xOwRMUOGyXXLKOP9o
     Dr+Nbfw98dhNEsL94Ym1W2iUW9yd5PyqwQnDDLDaqgMCCuAQABu83E06lXAxlSbTi3+P8AXqj
     yse67x1SjhptSnCMlbum4u/ya1Wq3O3+IvhG08N+FhaMDPfadB5kt2xKecGlHlLhsNuWIjIIy
     oKjoBj8tz1Nfo78R/iFdeK4bqaddrlQpVcCMhQVXaD827Jc7iej4wMc/nHKu2Vx6HFfU8MQqw
     w81WfvXR+C+I+HxGHeDWKd5tTb8rtN/e2xtFFFfZH4wFFFFAHt/wl+I8WoW9roeogNdwoIrcs
     21ZlHCqMfxgYAHf69fpT4F+MH8G/EPSbu4lEFnfMLK4Zjj90/Qk9AoZUJPTANfB/he4S18SaX
     NK+yJLqJnb0UOMn8q+qbqd5pVAOEQAAMOvPv7142Moxvot9z9a4XxMswwVbB4l3UEku9nffyV
     tOx79+0N8OU0n4hf2hFG8Wna5D9ryqhU+0K2y4VRyWJzFKzdC1zjtXIWHh2CzCmE5OAxWTlh7
     c9u1d54S8S2Xxc+EQ8N6jciw1vR9j2d2zFcOgYQs5CMzRkFkZRz1YDcFzxWn30qia1vY3hvLZ
     2hmhcjzIpFJV0OOMqwKnHcHFfE4uVWK32P2vgzEqVCWCqR/e0tNesejX5FHxF+70m9jI4MLgg
     LnAwf8/8A6q4/wBeJHp0lpEpSOF8qTknGAP5qa7vXpd2jXxjKysYWVTj+IggDHucV5f4ZMdnf
     TQJJ5ivK8RLNn50ZxgH6h/069+rAU3VwdW/Rr9T18xx9PC59gYveUZp97Xj+v5M7LVpFksJHB
     chV8zd/s4OeD9f84r4QkJaRicZJ7V946lam/wBFuPKK+Y0Rzt5HT+lfCFxC9vPLFIjRyRsUZG
     GCpBwQa9/I7ezmvM/IPF6/17C6acsvzV/0P//Z
    END:VCARD
    

    DAVdroid syncs correctly, including the photo. Proof:

    screenshot_2014-04-05-00-01-25



    1. Android 4.3.1 exports and imports vCard 2.1 - Step 1 in my previous comment didn't say "import into your CardDAV server" but "import into davdroid account" (using any app on an android phone, i used the default contacts app). It gets imported correctly including the photo. Please try to import the 2.1 vcard on your android phone and then sync it. It should import correctly and then fail to sync. (This should be always the case for 2.1 vcards with photos, e.g. if you receive it via email or bluetooth)
    2. It didn't find it, but it is there, since the contact app displays the photo. I guess this is where the error is.
    3. I have no problems with photos when syncing from server -> client. The problem is to get the photos from client -> server when they weren't written to the client by davdroid.

  • developer

    Indeed, I can now reproduce the issue.



  • wow, that was quick. Awesome! Looking forward for testing this. Thank you.


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.