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
I send this string by SMS as a plain message. Some Android phone can recognize this as a contact, however, most of the Android phone can not recognize, but I don't know how to send the contacts by MMS.
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.
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With