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 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.
SmsManager.sendDataMessage()
you could probably send the vcard calling method sendDataMessage from SmsManager class. that means you can't send send the vcard as plain message but you need to encode the vcard to hex. or you can probably look at this. http://code.google.com/p/android-vcard/
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.This may be helpful to you. Try this with your need -
for more detailed code you may also looke at http://code.google.com/p/android-vcard/downloads/list