Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
KushBB
Posts: 374
Registered: ‎04-07-2010
My Carrier: Airtel
Accepted Solution

Sending VCard in SMS

Hello every one!! Can I send Vcard in SMS? so that the receiver phone recognizes the SMS as VCard and prompt for saving it to contacts(Like it does for usual Vcard SMS) If Yes, Then how??? Thanks in Advance...
Press the Like button (Thumb up) on the left side to thank and
please mark the Thread as solved if its solved...
K.S
Please use plain text.
Developer
KushBB
Posts: 374
Registered: ‎04-07-2010
My Carrier: Airtel

Re: Sending VCard in SMS

Anyone with any Ideas on it??

 

Thanks in Advance...

Press the Like button (Thumb up) on the left side to thank and
please mark the Thread as solved if its solved...
K.S
Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008

Re: Sending VCard in SMS

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.

 

 

 

Please use plain text.
Developer
KushBB
Posts: 374
Registered: ‎04-07-2010
My Carrier: Airtel

Re: Sending VCard in SMS

[ Edited ]

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

Press the Like button (Thumb up) on the left side to thank and
please mark the Thread as solved if its solved...
K.S
Please use plain text.
New Contributor
Callie
Posts: 4
Registered: ‎10-07-2010

Re: Sending VCard in SMS

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

Please use plain text.
Regular Contributor
amrinder_singh_003
Posts: 97
Registered: ‎09-21-2010
My Carrier: developer

Re: Sending VCard in SMS

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 = (MessageConnectionConnector.open("sms://" destination ":9204");



BinaryMessage msg = (BinaryMessagecon.newMessage(MessageConnection.BINARY_MESSAGE);

msg.setPayloadData(card.getBytes("ISO-8859-1"));



con.send(msg);

 Regards

 Amrinder singh

 

Please use plain text.
Regular Contributor
amrinder_singh_003
Posts: 97
Registered: ‎09-21-2010
My Carrier: developer

Re: Sending VCard in SMS

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

 

Please use plain text.