Ad

Is It Possible To Add The Contact To The Users Address Book By Scaning QR Code?

- 1 answer

My app can generate QRCode. I want to share it with another person. Is it possible to generate QRCode with some user information? And when somebody scan it then it will save in user address book.

Ad

Answer

There's something called vCard format and I think that this could help you.

Here's a small example:

name = 'Carlos Sainz'
phone = 'xxxxxxxxx'
string_for_qr = f"BEGIN:VCARD\nVERSION:2.1\nFN:{name}\nTEL;CELL:{phone}\nEND:VCARD" 

If you create a QR code with the string "string_for_qr" then when you scan the QR code your phone will display the information with the option of save. Sorry for my poor english.

Ad
source: stackoverflow.com
Ad