09-18-2010 07:44 AM
Solved! Go to Solution.
09-19-2010 02:45 PM
Anyone with any Ideas on it??
Thanks in Advance...
09-19-2010 03:52 PM
I've done this but with mixed results.
You can convert the contact to a VCARD format using the standard API's.
See toSerialFormat() in the PIM classes.
Here is the tricky part: probably 95% of the time, your serialized VCARD is going to exceed 160 bytes. The BB SMS will chop this into multiple messages (probably two or three messages to get the entire VCARD).
Now, if the receiver is another Blackberry on the same network, this might actually work, and the entire VCARD might be recovered as one message on the other end, suitable for conversion back into a Contact. Most of the time, however, the receiver is a different platform and a different network, and the SMS will show up as multiple messages on the other end, each containing part of the VCARD data. In this case, the data is pretty-much useless.
I'd love to hear from someone who has resolved this issue.
09-20-2010 04:55 AM - edited 09-20-2010 04:57 AM
Thanks for the reply RexDoug...
Actually, I wanted the same behavior as Nokia(Symbian) does it...
Is it true that they do it by Modifying the header/footer(PDU) of the message??
If thats so... can it be done in BlackBerry??
Eagerly waiting for any response... Regards
10-07-2010 12:13 AM
HI
You can download an app at http://ichannel.myshopify.com that allows you to send and receive vcards via sms. It works on all Blackberry's
Callie
10-07-2010 03:53 PM
greetings
first ,fetch the value from the contact ,and pass the value to this code .
String card = "BEGIN:VCARD\r\n"
+ "VERSION:2.1\r\n"
+ "N:Hughes,Graham\r\n"
+ "TEL;PREF:+4412345678\r\n"
+ "END:VCARD\r\n";
MessageConnection con = (MessageConnection) Connector.open("sms://" + destination + ":9204");
BinaryMessage msg = (BinaryMessage) con.newMessage(MessageConnection.BINARY_MESSAGE);
msg.setPayloadData(card.getBytes("ISO-8859-1"));
con.send(msg);
Regards
Amrinder singh
10-07-2010 03:54 PM
greetings
first ,fetch the value from the contact ,and pass the value to this code .
String card = "BEGIN:VCARD\r\n"
+ "VERSION:2.1\r\n"
+ "N:Hughes,Graham\r\n"
+ "TEL;PREF:+4412345678\r\n"
+ "END:VCARD\r\n";
MessageConnection con = (MessageConnection) Connector.open("sms://" + destination + ":9204");
BinaryMessage msg = (BinaryMessage) con.newMessage(MessageConnection.BINARY_MESSAGE);
msg.setPayloadData(card.getBytes("ISO-8859-1"));
con.send(msg);
Regards
Amrinder singh