• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending/Receiving SMS

 
ravinderSingh singh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm not sure if this is the right forum but could anyone advise me how to enable my web application to generate and receive SMS (text) messages?

Thanks.
 
Casper Maxwell
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may try this tip:

http://www.java-tips.org/content/view/96/39/
 
Debojit Nag
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
U can go through this code and is working in my app. Let me know is it working for u?

try {
//String addr = "com.nokia.sms://+6230101:50000";
String addr = "sms://+"+lPhNum; // destination no. = lPhNum
MessageConnection conn = (MessageConnection) Connector.open(addr);
TextMessage msg = (TextMessage)conn.newMessage(MessageConnection.TEXT_MESSAGE);
msg.setPayloadText(lSMSUrl);
conn.send(msg);
conn.close();
} catch (Exception e) {
System.out.println("Exception in SMS");
e.printStackTrace();
}
 
William Frantz
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ravinderSingh singh:
I'm not sure if this is the right forum but could anyone advise me how to enable my web application to generate and receive SMS (text) messages?


Your "web application"? Do you mean a program running on a web server (J2EE, PHP, ASP, etc) or do you mean a program running on a cell phone (J2ME)?

A very simple way to send an SMS message through US carriers is to use Teleflip. Just send a plain old e-mail to <number>@teleflip.com. For more info, read this:

http://www.sprintdevelopers.com/postp474.html

Or this:

http://apgap.com/wp/24

William Frantz
http://sprintdevelopers.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic