Problem with SMS Send
| Newsgroups | gmane.comp.java.sun.kvm |
|---|---|
| Message-ID | <22472289.57531188800209052.JavaMail.tomcat@sdcst12.sjc.collab.net> |
Hello.
I really don't know if my problem is sending the message, the phone i am using or the network provider.
The scenario is:
1. I wrote a simple program to send SMS text messages.
2. I am testing the midlet in 2 phones:
* LG KG800 (Chocolate)
* Motorola Rokr E2
3. The code for the SMS sending is the following (The rest of the code is just costructing the interface for the middlet):
[code]
class SMSSender implements Runnable {
public void run () {
try {
String addr = "sms://+" + dest.getString();
MessageConnection conn = (MessageConnection) Connector.open(addr);
TextMessage msg = (TextMessage) conn.newMessage(MessageConnection.TEXT_MESSAGE);
msg.setPayloadText(textMesg.getString() );
conn.send(msg);
conn.close();
Alert smsSend = new Alert("Send", "En mensaje se envio exitosamente\n\n" + addr, null, AlertType.INFO);
smsSend.setTimeout(Alert.FOREVER);
display.setCurrent(smsSend, mainForm);
} catch (Exception e) {
Alert exception = new Alert("Exception", "Error al enviar el mensaje\n\n" + e.getMessage() + "\n\n" + e.toString(), null, AlertType.ERROR);
exception.setTimeout(Alert.FOREVER);
display.setCurrent(exception, mainForm);
}
}
}
[/code]
(i put the code in a thread because if i didn't the rokr phone gave an exception about blocking activity)
4. The program runs fine in both phones. The suite is not signed because the LG software don't let me install it if i do.
5. My wireless network is 'Telcel GSM' (Mexico)
Now the problem:
The program runs in both phones, i write the phone number of the receiver, the message and click send. I get the security warning about the application trying to send a message. I accept and then i get in both phones the Alert saying the message was succesfully sent.
The problem is i never receive the message in the receivers phone.
If i understood correctly if i use the URL sms://+phoneNumber (without a port) the sms message should be sent in a client connection and be received by the normal inbox of the receivers phone.
Anyone have any idea of what could be going wrong? It could be that my wireless network? The phones? Or maybe a hit or something i misunderstood?
Thx in advance for your help!
Abi.
[Message sent by forum member 'abigp' (abigp)]
http://forums.java.net/jive/thread.jspa?messageID=233613
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".