我怎么能发送名片/通讯录/?VCF VAR短信或彩信中的Andr​​oid? [英] How can I send vcard/contacts/?vcf var SMS or MMS in Android?

查看:387
本文介绍了我怎么能发送名片/通讯录/?VCF VAR短信或彩信中的Andr​​oid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过修改Android源$ C ​​$ C,可以发送(联系人/电子名片/ .vcf文件)
彩信或短信,Android的默认方式是通过蓝牙。
我找了很多办法,但是这一切都无法正常工作。
我知道VCF格式是这样的:

I want to modify the Android source code that can send (contacts/vcard/.vcf file) by mms or SMS, the Android default way is through Bluetooth. I find a lot of ways, but it all doesn't work. I know the vcf format is like this:

BEGIN:VCARD
VERSION:2.1
N:;lybeen;;;
FN:lybeen
TEL;CELL;
PREF:1-123-234-1234
TEL;CELL:000-111-1111
END:VCARD

我通过短信发送此字符串作为普通的消息。一些Android手机可以recoginse这是一个接触,但大多数的Andr​​oid手机不能recoginse,但我不知道如何通过彩信发送的联系人。

I send this string by SMS as plain message. Some Android phone can recoginse this as a contact, however most of the Android phone can not recoginse, but I don't know how to send the contacts by mms.

推荐答案

不过我觉得我是在回答问题时,是否会有助于OP与否,但它永远是有益的未来游客晚了。

though i think i am late in answering the question, whether it will help the OP or not, but it will always be helpfull for the future visitors.

要通过彩信发送名片,你只需要连接的.vcf 与系统的意向文件。

To send Vcard through mms, you just need to attach the .vcf file with the system's intent.

            Intent sendIntent = new Intent(Intent.ACTION_SEND);
            sendIntent.setType("text/x-vcard");
            sendIntent.putExtra(Intent.EXTRA_STREAM,
                    Uri.fromFile(outputFile));
            startActivity(sendIntent);

这篇关于我怎么能发送名片/通讯录/?VCF VAR短信或彩信中的Andr​​oid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆