VCard QR Code Andorid

234 views
Skip to first unread message

Michelle

unread,
Jan 18, 2023, 8:01:42 PM1/18/23
to XMPie Interest Group
Hi all. I've created a VCard QR Code which works perfectly well on an iPhone but when used on an Android the name and street name doesn't appear in the contacts.
Does anyone have any ideas how to rectify this?

Below is the code used.

XMPBarcode("QRCode", "BEGIN:VCARD\r\nVERSION:3.0\r\nFN:" & @{Firstname} & " " & @{Surname} & "\r\nN:" & @{Surname} & ";" & @{Firstname} & "\r\nEMAIL:" & @{Email} & "\r\nTEL;TYPE=mobile,pref:" & @{Mobile} & "\r\nTEL;TYPE=direct,voice:" & @{Direct} & "\r\nADR;TYPE=address:" & @{AddressLine1} & ";" & @{AddressLine2} & ";;" & @{Suburb} & ";" & @{State} & ";" & @{Postcode} & ";\r\nTITLE:" & @{Title} & "\r\nORG:" & @{Company} & "\r\nURL:" & @{URL} & "\r\nX-SOCIALPROFILE;TYPE=linkedin:www.linkedin.com/in/" & @{LinkedIn} & "\r\nEND:VCARD", "")

couch

unread,
Jan 18, 2023, 8:36:00 PM1/18/23
to XMPie Interest Group
I checked your code on my Google Pixel. 
Apps such as QR Code and QR Scanner  (free from Google Store) read all fields, including the address lines, fine.
However, using the camera and Google Lens show the address lines missing.
I suspect that this has something to do with the VCard Version used by Google Lens, but I can't find any references online to indicate the version supported by GL.
The main thing is that your code is fine and the problem is with the device doing the reading.

Michelle

unread,
Jan 18, 2023, 8:51:17 PM1/18/23
to XMPie Interest Group
Wonderful.

Thank you so much. I'll advise my client.

couch

unread,
Jan 18, 2023, 9:08:18 PM1/18/23
to XMPie Interest Group
As a matter of interest, I found that you can use Google Contacts to export a contact's details to a VCF file - which is a text file that contains the same VCARD data structure that you are using.

You can import this file into Google Contacts (web page) and the address is imported.

But, display the same text in a QR code and you get the same behaviour that you noted:
* all fields come into iPhone OK, 
* all fields come into Android OF if you use 3rd party apps to scan the barcode
* address fields are missing when using default android camera and/or Google Lens

Michelle

unread,
Jan 18, 2023, 9:09:48 PM1/18/23
to XMPie Interest Group
Thank you

Michelle

unread,
Jan 29, 2023, 6:26:20 PM1/29/23
to XMPie Interest Group
Would anyone know why the name doesn't appear? The customer is using a Google Pixel Phone.

couch

unread,
Jan 30, 2023, 4:51:54 PM1/30/23
to XMPie Interest Group
Using your code with some static values instead of variables:

XMPBarcode("QRCode", "BEGIN:VCARD\r\nVERSION:3.0\r\nFN:Joe Bloggs\r\nN:Bloggs;Joe\r\nEMAIL:nor...@xmpie.net\r\nTEL;TYPE=mobile,pref:0417123456\r\nTEL;TYPE=direct,voice:0212345678\r\nADR;TYPE=address:123 Some Street;Appartment b;;Sydney;NSW;2000;\r\nTITLE:Manager\r\nORG:XMPie Inc\r\nURL:http://www.xmpie.com\r\nEND:VCARD", "")

Here is the result on my Google Pixel 7 pro:
Screenshot_20230131-084321.png

Certainly seems like the firstname is there to me...
Barcodes are dependent on the device and software that scans them.
Best advice is to send feedback to Google: Settings -> About Phone -> Send Feedback about this device.

Michelle

unread,
Jan 30, 2023, 5:04:37 PM1/30/23
to XMPie Interest Group
Thanks so much Couch.
Reply all
Reply to author
Forward
0 new messages