【问题标题】:android respond to contact > send?android回复联系人>发送?
【发布时间】:2011-10-10 14:41:27
【问题描述】:

我正在寻找使我的应用响应联系人 > 发送的魔法咒语。我希望能够接收联系人的 URI 以检索联系人。有人有这个清单过滤器/代码sn-p吗?

【问题讨论】:

    标签: android android-contacts


    【解决方案1】:

    我没有睾丸,但您可以尝试基于 ACTION_SEND 和 mime 类型 vcard 的 Intent 过滤器。再次,未测试:

      <intent-filter>
        <action android:name="android.intent.action.SEND"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <data android:mimeType="text/x-vcard"/>
      </intent-filter>
    

    【讨论】:

    • 谢谢,有点效果。我看到的是接收者将该数据视为 file:// URI,指向 /sdcard/System 中写入 .vcffile 的文件。所以现在我需要一个 .vcf 解析器 :(
    • 是的,我想这是预期的结果 :) Gmail 和 MMS 只会将此 vcard 文件作为附件发送
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-19
    相关资源
    最近更新 更多