Name Fields filled up with company content



  • Hi,

    in a Nextcloud (18.0.3) contact the company name is correct, the vcard looks fine.

    Download vcard part from nextcloud:

    N:;;;;
    FN:Gartelmann’s Gasthof
    ORG:Gartelmann’s Gasthof

    In Android (9), contact app from google and samsung’s preinstalled app, the company name is also copyed and splitted in N: first name, surname. An error of davx5?

    ![0_1585396106975_20200328_124457.jpg](Uploading 100%)

    When Sort/Display is set to surname first, all company’s without personal contact are in wrong order and displayed false.

    Regards
    J.Z.


  • developer

    Hi,

    I have reproduced the problem. DAVx⁵ inserts only the FN, but Android generates a given name/family name from the data:

    2020-03-28 16:29:21.803 9261-9403/at.bitfire.davdroid D/davdroid.vcard4android: [AndroidContact] Built StructuredName data row
        	PARAMETER #0 = mType: 1, mUri: content://com.android.contacts/data?caller_is_syncadapter=true&account_name=Test%20Addressbook%20(555%40bitfire.at%201Q)&account_type=at.bitfire.davdroid.address_book, mSelection: null, mExpectedCount: null, mYieldAllowed: false, mValues: mimetype=vnd.android.cursor.item/name data1=Company Only data2=null data3=null data4=null data5=null data6=null data7=null data8=null data9=null, mValuesBackReferences: null, mSelectionArgsBackReferences: null
    

    DATA1 is the display name, all other fields are set to null.

    Android rewrites the contact to this:

    $ adb shell content query --uri content://com.android.contacts/raw_contacts/87/data
    Row: 0 phonetic_name=NULL, status_res_package=NULL, custom_ringtone=NULL, contact_status_ts=NULL, account_type=at.bitfire.davdroid.address_book, data_version=0, photo_file_id=NULL, contact_status_res_package=NULL, group_sourceid=NULL, display_name_alt=Only, Company, sort_key_alt=Only, Company, mode=NULL, last_time_used=0, starred=0, contact_status_label=NULL, has_phone_number=0, chat_capability=NULL, raw_contact_id=87, carrier_presence=0, contact_last_updated_timestamp=1585409361844, res_package=NULL, photo_uri=NULL, data_sync4=NULL, phonebook_bucket=3, times_used=0, display_name=Company Only, sort_key=Company Only, data_sync1=NULL, version=2, data_sync2=NULL, data_sync3=NULL, photo_thumb_uri=NULL, status_label=NULL, contact_presence=NULL, in_default_directory=1, times_contacted=0, _id=588, account_type_and_data_set=at.bitfire.davdroid.address_book, name_raw_contact_id=87, status=NULL, phonebook_bucket_alt=15, last_time_contacted=0, pinned=0, is_primary=0, photo_id=NULL, contact_id=87, contact_chat_capability=NULL, contact_status_icon=NULL, in_visible_group=1, phonebook_label=C, account_name=Test Addressbook (555@bitfire.at 1Q), display_name_source=40, data9=NULL, dirty=0, sourceid=2662EA3C-B2AD-40AC-B657-9122A8AC9F8E.vcf, phonetic_name_style=0, send_to_voicemail=0, data8=NULL, lookup=1680e2662EA3C-B2AD-40AC-B657-9122A8AC9F8E..vcf, data7=NULL, data6=NULL, phonebook_label_alt=O, data5=NULL, is_super_primary=0, data4=NULL, data3=Only, data2=Company, data1=Company Only, data_set=NULL, contact_status=NULL, backup_id=NULL, preferred_phone_account_component_name=NULL, raw_contact_is_user_profile=0, status_ts=NULL, data10=1, preferred_phone_account_id=NULL, data12=NULL, mimetype=vnd.android.cursor.item/name, status_icon=NULL, data11=0, data14=NULL, data13=NULL, hash_id=emINe07ChV4z0UfFi+tLArzcnI8=
    , data15=NULL
    

    As you can see, data2 (given name)=Company and data3 (family name)=Only now.

    You would have to dig intro the Android contacts provider for more details…


Log in to reply
 

Similar topics

  • 1
  • 2
  • 2