简体   繁体   English

在Android上导入vCard

[英]Import vCard on android

I need to import multiple vCard files in android contacts, android contacts already have the feature of importing vCard files, what i need to do is to pass an Array contains paths to each vCard file and make the contacts app in android import them for me without user interaction. 我需要在Android联系人中导入多个vCard文件,Android联系人已经具有导入vCard文件的功能,我需要做的是传递一个包含每个vCard文件路径的数组,并使android中的通讯录应用为我导入它们用户互动。

Any suggestions ? 有什么建议么 ?

android contacts already have the feature of importing vCard files android联系人已经具有导入vCard文件的功能

Different devices have different "contacts" apps. 不同的设备具有不同的“联系人”应用程序。 Not all will necessarily support importing vCard files. 并非所有人都必须支持导入vCard文件。

and make the contacts app in android import them for me without user interaction 并让android中的通讯录应用无需用户交互即可为我导入

That is not possible. 这是不可能的。 Even for those contact apps that support vCards, the import process is done by activities and therefore involves user interaction. 即使对于那些支持vCard的联系人应用程序,导入过程也是由活动完成的,因此涉及用户交互。

You will need to parse the vCard file(s) yourself and use the ContactsContract ContentProvider to add the contacts. 您将需要自己解析vCard文件,并使用ContactsContract ContentProvider添加联系人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM