Exporting and importing Vcard

我们两清 提交于 2019-12-02 07:31:52

I would think that if they abide with the standard (Cant be sure as not lucky enough to own all those devices) then yes they should export the same.

From http://en.wikipedia.org/wiki/VCard

The following is an example of a VCard file containing information for one person:

vCard 2.1:

BEGIN:VCARD
VERSION:2.1
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
TEL;WORK;VOICE:(111) 555-1212
TEL;HOME;VOICE:(404) 555-1212
ADR;WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:100 Waters Edge=0D=0ABaytown, LA 30314=0D=0AUnited States of America
ADR;HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:42 Plantation St.=0D=0ABaytown, LA 30314=0D=0AUnited States of America
EMAIL;PREF;INTERNET:forrestgump@example.com
REV:20080424T195243Z
END:VCARD

vCard 3.0:

BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;VALUE=URL;TYPE=GIF:http://www.example.com/dir_photos/my_photo.gif
TEL;TYPE=WORK,VOICE:(111) 555-1212
TEL;TYPE=HOME,VOICE:(404) 555-1212
ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;TYPE=WORK:100 Waters Edge\nBaytown, LA 30314\nUnited States of America
ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America
EMAIL;TYPE=PREF,INTERNET:forrestgump@example.com
REV:20080424T195243Z
END:VCARD

Version 2.1 of the vCard standard is widely supported by e-mail clients. Version 3.0 of the vCard format is an IETF standards-track proposal contained in RFC 2425 and RFC 2426.

iOS provide any mechanisms for accessing the contacts database within mobile Safari. The only way to export contacts en mass would be through a native app.

A very kludgey way to export contacts one at time from iOS would be by email. iOS lets a user fairly easily send a .vcard file as an email attachment.

A workflow could go about like this:

  1. Have the user opt-in for contact exporting by email
  2. Generate a unique email address for a user on your server. Something similar to the post by email addresses that flickr and others provide, something along the lines of
    contacts-export+[unique string]@exmple.com
  3. Instruct user to add said email address to the iOS contacts database
    (tap & hold on email address -> Create New Contact)
  4. Instruct user to open the Contacts app find the contact(s) they wish to export and for each contact
    select Share Contact -> Email -> send to the previously saved email address
  5. Create a cron job to periodically check and process these incoming messages

This all seems like a lot of work for both the end user and you, the developer. That being said if your users are savvy enough to handle that convoluted workflow, it would certainly be much handier than copy/pasting for one off contact exporting, particularly for any contact that has more than just one or two associated fields.

I'm not sure what Android, Blackberry, et al support in terms of exporting.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!