今天在研究NFC的时候,有VCardTag才聊了了VCard这种电子名片。
以下是VCard的格式例子,也是在MockNdefMessages里面定义的 VCard tag
BEGIN:VCARD
VERSION:3.0
N:Employee;Joe;Google;;
FN:Joe Google Employee
TEL;TYPE=WORK;TYPE=PREF:650-253-0000
EMAIL;TYPE=X-INTERNET:support@google.com
ADR;TYPE=WORK:;;1600 Amphitheatre Parkway;94043 Mountain View;;;
ORG:Google
TITLE:Software Engineer
URL:http://www.google.com
END:VCARD
public static final byte[] VCARD = new byte[] { (byte) 0xc2, (byte) 0x0c,
(byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0x05, (byte) 0x74,
(byte) 0x65, (byte) 0x78, (byte) 0x74, (byte) 0x2f, (byte) 0x78,
(byte) 0x2d, (byte) 0x76, (byte) 0x43, (byte) 0x61, (byte) 0x72,
(byte) 0x64, (byte) 0x42, (byte) 0x45, (byte) 0x47, (byte) 0x49,
(byte) 0x4e, (byte) 0x3a, (byte) 0x56, (byte) 0x43, (byte) 0x41,
(byte) 0x52, (byte) 0x44, (byte) 0x0d, (byte) 0x0a, (byte) 0x56,
(byte) 0x45, (byte) 0x52, (byte) 0x53, (byte) 0x49, (byte) 0x4f,
(byte) 0x4e, (byte) 0x3a, (byte) 0x33, (byte) 0x2e, (byte) 0x30,
(byte) 0x0d, (byte) 0x0a, (byte) 0x46, (byte) 0x4e, (byte) 0x3a,
(byte) 0x4a, (byte) 0x6f, (byte) 0x65, (byte) 0x20, (byte) 0x47,
(byte) 0x6f, (byte) 0x6f, (byte) 0x67, (byte) 0x6c, (byte) 0x65,
(byte) 0x20, (byte) 0x45, (byte) 0x6d, (byte) 0x70, (byte) 0x6c,
(byte) 0x6f, (byte) 0x79, (byte) 0x65, (byte) 0x65, (byte) 0x0d,
(byte) 0x0a, (byte) 0x41, (byte) 0x44, (byte) 0x52, (byte) 0x3b,
(byte) 0x54, (byte) 0x59, (byte) 0x50, (byte) 0x45, (byte) 0x3d,
(byte) 0x57, (byte) 0x4f, (byte) 0x52, (byte) 0x4b, (byte) 0x3a,
(byte) 0x3b, (byte) 0x3b, (byte) 0x31, (byte) 0x36, (byte) 0x30,
(byte) 0x30, (byte) 0x20, (byte) 0x41, (byte) 0x6d, (byte) 0x70,
(byte) 0x68, (byte) 0x69, (byte) 0x74, (byte) 0x68, (byte) 0x65,
(byte) 0x61, (byte) 0x74, (byte) 0x72, (byte) 0x65, (byte) 0x20,
(byte) 0x50, (byte) 0x61, (byte) 0x72, (byte) 0x6b, (byte) 0x77,
(byte) 0x61, (byte) 0x79, (byte) 0x3b, (byte) 0x39, (byte) 0x34,
(byte) 0x30, (byte) 0x34, (byte) 0x33, (byte) 0x20, (byte) 0x4d,
(byte) 0x6f, (byte) 0x75, (byte) 0x6e, (byte) 0x74, (byte) 0x61,
(byte) 0x69, (byte) 0x6e, (byte) 0x20, (byte) 0x56, (byte) 0x69,
(byte) 0x65, (byte) 0x77, (byte) 0x0d, (byte) 0x0a, (byte) 0x54,
(byte) 0x45, (byte) 0x4c, (byte) 0x3b, (byte) 0x54, (byte) 0x59,
(byte) 0x50, (byte) 0x45, (byte) 0x3d, (byte) 0x50, (byte) 0x52,
(byte) 0x45, (byte) 0x46, (byte) 0x2c, (byte) 0x57, (byte) 0x4f,
(byte) 0x52, (byte) 0x4b, (byte) 0x3a, (byte) 0x36, (byte) 0x35,
(byte) 0x30, (byte) 0x2d, (byte) 0x32, (byte) 0x35, (byte) 0x33,
(byte) 0x2d, (byte) 0x30, (byte) 0x30, (byte) 0x30, (byte) 0x30,
(byte) 0x0d, (byte) 0x0a, (byte) 0x45, (byte) 0x4d, (byte) 0x41,
(byte) 0x49, (byte) 0x4c, (byte) 0x3b, (byte) 0x54, (byte) 0x59,
(byte) 0x50, (byte) 0x45, (byte) 0x3d, (byte) 0x49, (byte) 0x4e,
(byte) 0x54, (byte) 0x45, (byte) 0x52, (byte) 0x4e, (byte) 0x45,
(byte) 0x54, (byte) 0x3a, (byte) 0x73, (byte) 0x75, (byte) 0x70,
(byte) 0x70, (byte) 0x6f, (byte) 0x72, (byte) 0x74, (byte) 0x40,
(byte) 0x67, (byte) 0x6f, (byte) 0x6f, (byte) 0x67, (byte) 0x6c,
(byte) 0x65, (byte) 0x2e, (byte) 0x63, (byte) 0x6f, (byte) 0x6d,
(byte) 0x0d, (byte) 0x0a, (byte) 0x54, (byte) 0x49, (byte) 0x54,
(byte) 0x4c, (byte) 0x45, (byte) 0x3a, (byte) 0x53, (byte) 0x6f,
(byte) 0x66, (byte) 0x74, (byte) 0x77, (byte) 0x61, (byte) 0x72,
(byte) 0x65, (byte) 0x20, (byte) 0x45, (byte) 0x6e, (byte) 0x67,
(byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x65, (byte) 0x72,
(byte) 0x0d, (byte) 0x0a, (byte) 0x4f, (byte) 0x52, (byte) 0x47,
(byte) 0x3a, (byte) 0x47, (byte) 0x6f, (byte) 0x6f, (byte) 0x67,
(byte) 0x6c, (byte) 0x65, (byte) 0x0d, (byte) 0x0a, (byte) 0x55,
(byte) 0x52, (byte) 0x4c, (byte) 0x3a, (byte) 0x68, (byte) 0x74,
(byte) 0x74, (byte) 0x70, (byte) 0x3a, (byte) 0x2f, (byte) 0x2f,
(byte) 0x77, (byte) 0x77, (byte) 0x77, (byte) 0x2e, (byte) 0x67,
(byte) 0x6f, (byte) 0x6f, (byte) 0x67, (byte) 0x6c, (byte) 0x65,
(byte) 0x2e, (byte) 0x63, (byte) 0x6f, (byte) 0x6d, (byte) 0x0d,
(byte) 0x0a, (byte) 0x45, (byte) 0x4e, (byte) 0x44, (byte) 0x3a,
(byte) 0x56, (byte) 0x43, (byte) 0x41, (byte) 0x52, (byte) 0x44,
(byte) 0x0d, (byte) 0x0a };
一开始我不了解VCard的格式,想了解一下VCard在NFC是如何定义的,我就把上面的十六进制一个一个的翻译。我真佩服我的耐心(傻人笨人^_^)后来,我到网上搜索VCard才知道已经是有规范的啦!唉!井底之蛙!
后来我VCard tag import到Contact之后,我再export到/mnt/sdcard,再export到电脑上0001.vcf, 用记事本打开一看,呵呵,跟我翻译那十六进制的结果是一样的。
分享到:
相关推荐
Vcard(vcf)文件生成器是一款专业的vcf文件生成工具软件。现在安卓系统的手机通迅录一般是支持Vcf文件格式,而软件最大的特色是可以实现直接在android系统的的手机通讯录导入EXCEL文件,并将其直接转化为vcf文件。...
小米XML文件转Vcard.zip
在android平台开发中关于vcard数据类型的组织和创建,网上相关例子已经有很多,LZ将网上的jar包汇总,总过查看源代码,发现 android-vcard-1.3.jar、 android-vcard-1.4.jar等版本其源代码均是一样的,只支持电话、...
vcf文件生成器通讯录vcf转excel工具,excel转vCard
Vcard2.1&3.0Vcard2.1&3.0Vcard2.1&3.0Vcard2.1&3.0Vcard2.1&3.0
将手机联系人备份从vCard3.0文件转为vCard2.1文件(旧式手机需要) 。 在Python3.7下可运行,不支持头像转换。
通讯录文件vcard解析源码,纯 C语言实现,适合于消费电子类产品应用。
全面解读 txt excel word 转 vcard 并导入手机通讯录方法 随着移动设备的普及,手机通讯录已经成为我们生活中的一个重要组件。但是,如何将大量的联系人信息从 TXT、Excel、Word 等文件中导入到手机通讯录中,却成...
public $vcard_birtda;// Birthday YYYY-MM-DD public $vcard_f_name;// Family name public $vcard_cellul;// Cellular Phone Number Mobile public $vcard_compan;// Company Name public $vcard_h_addr;// ...
vCard 规范容许公开交换个人数据交换 (Personal Data Interchange PDI) 信息,在传统纸质商业名片可找到这些信息。规范定义电子名片(或叫vCard)的格式。 vCard 规范可作为各种应用或系统之间的交换格式。定义...
将手机联系人备份从vCard3.0文件转为vCard2.1文件(旧式手机需要) 。 在Python3.7下可运行,不支持头像转换。
VCARD解析。可以用于手机发送联系人功能的VCARD解析。
C#写的vcard转换器,能够从text 或者 cvs 文件批量生成vcard文件,从而不需要手工一个一个录入通讯录。 需要的话,可以增加其他的输入信息,或者解析vcard文件生成text文件或者excel文件。
vcard批量导入, 可以同时导出多种格式xls txt csv 等文件
TXT转换vcard工具,TXT免费转换vcard格式,也可以vcard格式免费转换TXT。本软件是开源的,下载打开就能用,直接导入文件进行转换即可!
android-vcard-1.4.7z
android-vcard-1.3.rar android-vcard-1.3.rar android-vcard-1.3.rar android-vcard-1.3.rar android-vcard-1.3.rar 包含demo和src
ez-vcard, 用于Java的vCard分析程序库 位 vcard持续集成: 代码覆盖率: Maven 中心: 聊天室: 许可证: ez vCard是用Java编写的vCard库。 它可以以多种格式读取和写入 vcard 。 因为
c# vcard开发api源码 供给vcard开发同志们使用. 内置所有c#编写的通用类库.
android-vcard.