How to get a vCard (.vcf file) into Android contacts from website

前端 未结 7 1532
花落未央
花落未央 2020-12-08 22:46

I\'m trying to add a vCard from a web link to the user\'s contact list on Android 2.2. When I direct the user to .vcf file, all I get is text output in the mobile browser.

相关标签:
7条回答
  • 2020-12-08 23:20

    There is now an import functionality on Android ICS 4.0.4.

    First you must save your .vcf file on a storage (USB storage, or SDcard). Android will scan the selected storage to detect any .vcf file and will import it on the selected address book. The functionality is in the option menu of your contact list.

    !Note: Be careful while doing this! Android will import EVERYTHING that is a .vcf in your storage. It's all or nothing, and the consequence can be trashing your address book.

    0 讨论(0)
  • 2020-12-08 23:24

    What i have also noticed is that you have to save the file as Unicode, UTF-8, no BOM in an Windows format with CRLF (Carriage Return, Line Feed). Because if you don't, the import will break. (Saying something about weird chars in the file)

    Good luck :) Sid

    0 讨论(0)
  • 2020-12-08 23:28

    I had problems with importing a VERSION:4.0 vcard file on Android 7 (LineageOS) with the standard Contacts app.

    Since this is on the top search hits for "android vcard format not supported", I just wanted to note that I was able to import them with the Simple Contacts app (Play or F-Droid).

    0 讨论(0)
  • 2020-12-08 23:30

    AFAIK Android doesn't support vCard files out of the Box at least not until 2.2.

    You could use the app vCardIO to read vcf files from your SD card and save to you contacts. So you have to save them on your SD card in the first place and import them afterwards.

    vCardIO is also available trough the market.

    0 讨论(0)
  • 2020-12-08 23:39

    Just to let you know: I just tried it using a vCard 2.1 file created according to the vCard 2.1 spec. I found that vCard 2.1, despite being an old version, already covered everything I needed, including a base64-encoded photo and international character sets.

    It worked perfectly on my unmodified Android 4.1.1 device (Galaxy S3). It also worked on an old iPhone 3GS (iOS 5, via the Evernote app) and a coworker's unmodified old Android 2.1 device. You only need to set the Content-disposition to attachment as suggested above.

    A minor problem was that I triggered the VCF download using a QR code, which I scanned with the Microsoft Tag app. That app told me Android couldn't handle the text/x-vcard media type (or just text/vcard, no matter). Once I opened the link in a Web browser (I tried Chrome and the Android default browser), it worked fine.

    0 讨论(0)
  • 2020-12-08 23:39

    I'm running 2.2 and there is no change, reports from others on 2.3 say the same. Android (bug) does not handle a .vcf nor a link to such a file on a web page via port 80, neither via http headers or direct streaming. It just is NOT SUPPORTED AT ALL.

    0 讨论(0)
提交回复
热议问题