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

New Developer
Posts: 10
Registered: ‎08-12-2010
My Device: Not Specified
Accepted Solution

SMS message won't send

[ Edited ]

I'm trying to send a message from a vector of numbers, everything works fine in the simulators but when i try it on a real device (9630) nothing happens (no exceptions thrown either). I've tried with and without port numbers and am running out of ideas, any help would be greatly appreciated, thanks. Here is my code (there is a loop surrounding this incrementing i):



_conn = (MessageConnection)Connector.open("sms://"+_cntctsNmbrs.elementAt(i)+":0");
				final TextMessage msgOut = (TextMessage) _conn.newMessage(MessageConnection.TEXT_MESSAGE);



Posts: 83
Registered: ‎10-26-2008
My Device: Z10
My Carrier: MTS UKR

Re: SMS message won't send

If you're sending a couple of messages, try to add 1 minute delay between them.


Also try this method:


DatagramConnection dgConn; 
dgConn = (DatagramConnection)Connector.open("sms://" + _cntctsNmbrs.elementAt(i));
byte[] data = "MessageBody".getBytes();
Datagram dg = dgConn.newDatagram(dgConn.getMaximumLength());
dg.setData(data, 0, data.length);