如何发送电子名片为短信/彩信? [英] How to send vcard as an sms/mms?

查看:257
本文介绍了如何发送电子名片为短信/彩信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
              我在一个应用程序,它能够发送电子名片(VCF文件)的功能性的工作,我已经产生了特定的联系,并能够使用电子邮件发送它的VCF文件,但我想通过短信/彩信的功能,无法将其发送做so.Ive通过论坛了,在很多问题他们建议sendDataMessage但它不工作呢用于me.In一些解决方案,他们建议Intent.EXRTA_STREAM,但它也没有工作,所以请给我以另一种方式发送vCard从我的应用程序或尝试提供一些code.Thanx

Hi everyone, I am working on an application,which has the functionality of sending vcard(vcf files),Ive generated a vcf file of a particular contact and able to send it using email, but i want to send it via sms / mms functionality and unable to do so.Ive gone through the forum , in many question they suggested sendDataMessage but it is not wokring for me.In some solutions they suggested Intent.EXRTA_STREAM , but it is also not working , so please give me an alternative way to send a vcard from my application or try to provide some code.Thanx

推荐答案

正如你所产生的电子名片的的.vcf 文件。那么你可以附加与系统的意图将其作为彩信这个文件。

As you have generated .vcf file of vcard. then you can attach this file with the system's intent to send it as MMS.

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

这篇关于如何发送电子名片为短信/彩信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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