4

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

Gagan Tiwari
  • 212
  • 2
  • 16

1 Answers1

1

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);
Sahil Mahajan Mj
  • 11,033
  • 8
  • 53
  • 100
  • hey Sahil,I developing a chat application so i want to send contacts in chat like whats app so plz help me that how to get solution. thanks – anupam sharma Jun 26 '14 at 05:45