10-11-2007, 10:24 AM
|
#1 (permalink)
|
| New Member
Join Date: Oct 2007 Model: 8300 PIN: N/A Carrier: vodafone
Posts: 1
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Problem sending sms Please Login to Remove! Hi everybody !
I'm trying to simply send a sms to a recipient via J2ME. Is there any way to send a sms without signing the application ?
Here's the code i tested so far: MessageConnection connection = (MessageConnection) Connector.open("sms://");
TextMessage message = (TextMessage)
connection.newMessage(MessageConnection.TEXT_MESSA GE);
message.setPayloadText(smsText.toString());
message.setAddress("sms://" + receiveNumber);
connection.send(message);
This code blocks in the send() method and doesn't return.
I also tried to set the recipient number in Connector.open() like this: sms://+123456789
and it resulted in a IllegalArgumentException
Any hints or ideas ?
Thanks in advance,
Andre |
| Offline
| |