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.

inside custom component

Java Development

Reply
New Developer
abhishek92
Posts: 85
Registered: ‎12-02-2013
My Device: 9360 Curve

java.io.IOException Exception in sending sms

Hello everyone,

 

I am sending sms by use of following code:

MessageConnection mcon = null;
                try {
                    mcon = (MessageConnection) Connector.open("sms://"
                            + _address);
                    TextMessage tm = (TextMessage) mcon
                            .newMessage(MessageConnection.TEXT_MESSAGE);
                    tm.setPayloadText(_msg);
                    mcon.send(tm);
                    mcon.close();
                } catch (IOException ioe) {
                    throw ioe;
                }

 

but i am getting java.io.IOException i saw the document regarding this document says "if the firewall disallows a connection that is not btspp or comm" then this exception occurs what is the mean of that line and why i am getting this exception please suggest me. Thanks

Please use plain text.
Developer
peter_strange
Posts: 19,607
Registered: ‎07-14-2008
My Device: Not Specified

Re: java.io.IOException Exception in sending sms

To really find out what caused the IOException you need to find the detail message.  The easiest thing is to just a toString() on the Exception.  Can you do this for you situation and tell us what the message is?

Please use plain text.