Hi,

Can someone please post the code























...
Search Search

Now SMS/MMS Gateway » MMS & SMS Technical Discussions (not for Now Product Support) » Hi,

Can someone please post the code that I can use to send a simple vCard to any mobile phone (Nokia/Motorola/Sony/etc) using Logica OpenSMPP API?

I'd really appreciate it. It's kinda urgent.

All my attempts have failed. At best the following code triggers the mobile phone to claim that it cannot support the format and if I change the data coding it just opens a blank message:

sms = new SubmitSM ();
sms.setSourceAddr (srcAddr);
sms.setDestAddr(destAddr);
sms.setProtocolId((byte) 0);
sms.setDataCoding((byte) 0xF5);
sms.setEsmClass((byte) Data.SM_UDH_GSM);

ByteBuffer ed = new ByteBuffer();
ed.appendByte((byte) 6); // UDH Length
ed.appendByte((byte) 5); // IE Identifier
ed.appendByte((byte) 4); // IE Data Length
ed.appendShort((short) 0x23F4 ); // Destination Port
ed.appendShort((short) 0x0000); // Originator Port

ed.appendString("BEGIN:VCARD\r\nVERSION:2.1\r\nN:mySurname;myName\r\nTEL;PREF:+1119938338444\r\nEND:VCARD\r\n");

sms.setMessagePayload(ed);

Urgent: vCard using OpenSMPP API
« Previous Next »

Author Message
hesm hesm
New member
Username: Hsem

Post Number: 1
Registered: 11-2007
Posted on Sunday, November 11, 2007 - 09:38 pm:   

Hi,

Can someone please post the code that I can use to send a simple vCard to any mobile phone (Nokia/Motorola/Sony/etc) using Logica OpenSMPP API?

I'd really appreciate it. It's kinda urgent.

All my attempts have failed. At best the following code triggers the mobile phone to claim that it cannot support the format and if I change the data coding it just opens a blank message:

sms = new SubmitSM ();
sms.setSourceAddr (srcAddr);
sms.setDestAddr(destAddr);
sms.setProtocolId((byte) 0);
sms.setDataCoding((byte) 0xF5);
sms.setEsmClass((byte) Data.SM_UDH_GSM);

ByteBuffer ed = new ByteBuffer();
ed.appendByte((byte) 6); // UDH Length
ed.appendByte((byte) 5); // IE Identifier
ed.appendByte((byte) 4); // IE Data Length
ed.appendShort((short) 0x23F4 ); // Destination Port
ed.appendShort((short) 0x0000); // Originator Port

ed.appendString("BEGIN:VCARD\r\nVERSION:2.1\r\nN:mySurname;myName\r\nTEL;PREF:+1 119938338444\r\nEND:VCARD\r\n");

sms.setMessagePayload(ed);

session.submit(sms);

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image

Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Click here to register with this discussion board.
Password:
Options: Automatically activate URLs in message
Action:

Search Search Tree View Tree View   Home Home
Login Login / Register Topics Topics Search Last 1|3|7 Days   Previous Page Previous Next Next Page

© Copyright 2002-2007 by Now Wireless Limited
Airport House, Purley Way, Croydon, London, CR0 0XZ, UK
UK Tel: +44-20-8286-8080 US Tel: +1.410.833.8711
email : nowsms@now.co.uk