【问题标题】:Import a vcf file without using an intent android programically以编程方式在不使用意图 android 的情况下导入 vcf 文件
【发布时间】:2018-09-10 15:58:41
【问题描述】:

如何在不使用此代码的情况下导入vcf 文件

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, "text/x-vcard");
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(intent);

【问题讨论】:

  • “导入”是什么意思?您想在代码中引用它吗?你想展示它还是在没有 Intent 的情况下使用它?

标签: android vcf-vcard


【解决方案1】:

您可以使用 EzVcard 库:https://github.com/mangstadt/ez-vcard

使用Ezvcard.parse(vCardFile).first(),您可以解析vcard 格式的文件。

【讨论】:

    猜你喜欢
    • 2022-10-31
    • 1970-01-01
    • 2016-03-08
    • 1970-01-01
    • 2012-09-06
    • 1970-01-01
    • 2011-06-16
    • 2016-11-13
    • 2017-12-30
    相关资源
    最近更新 更多