• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending SMS from Java

 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I am aware that there is a Java API for sending SMS messages
from a PC onto a mobile phone.
But I dont know anything about the working environment.
Maybe some services must be installed on the PC for it to
work or the API does all that itself.
If a working environment must be set could you please forward
me to a page that describes in detail how to do it?
 
Mihai Lihatchi
Ranch Hand
Posts: 138
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
From my experience you need to have a contract with a SMS service provider. I used some API from Nokia (forum.nokia.com) for sending MMS messages through a server they own.
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if I do it through an SMTP server?
What gateway do I need to connect to the server so that it can send
SMS messages to mobile phones?
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did I say something wrong?
I just asked a question.
It's already been a week that no one wants to answer my question.
I want to send SMS messages from Java through a mobile phone
connected to my PC.
What tools do I need?
A phone. What kind of phone would you advise?
An API. javax.comm.* or something else?
What exactly?
Please Help!
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no one wants to answer my question

I'd be careful before drawing that conclusion. Maybe nobody can answer your question. Googling for "java sms" brings up lots of pages that look like they have relevant information.
[ February 28, 2006: Message edited by: Ulf Dittmer ]
 
Eduardo Marques
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The standard API for SMS/CBS messaging on J2ME devices is the Wireless Messaging API - WMA 1.1 (JSR-120) or WMA 2.0 (JSR-205)

WMA 1.1 - covers SMS and CBS -http://jcp.org/en/jsr/detail?id=120
WMA 2.0 - also covers MMS - http://jcp.org/en/jsr/detail?id=205

Be sure to check your target device supports WMA. A list of some device capabilities can be found at:
http://developers.sun.com/techtopics/mobility/device/device

There are several tutorials and technical articles about WMA, check Sun's site:

http://developers.sun.com/techtopics/mobility/allarticles/
http://developers.sun.com/techtopics/mobility/learning/tutorial/index.html
 
Jason Moors
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first thing you need to do is find a SMS gateway service provider. The service providers provide the gateway between the internet and the SMS network.

Most service providers provide a number of mechanism for generating SMS to name a few HTTP, FTP, XML-RPC, SMTP.

If your specifically interested in Java libraries you can try

http://smsj.sourceforge.net/

If it is critial for you to determine if a SMS message has been sent, I would advise not using SMTP, as it's difficult to get the return code.

regards

Jason
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I understand if you send SMS from Java through a phone connected
to PC then you dont need any third-party tool.
My problem is I'm going to purchase a mobile phone to begin developing
it but I dont know which one to purchase exactly.

I just need to know if this
1. Mobile phone
2. Cable to connect it to USB
3. javax.comm.* package installed
4. A Java API to communicate with the phone
is enough to do what I want to?
If the API is jSMS will any Nokia or Erricson do?
If not which Nokia model exactly will support it?
Waiting for reply.......
Thank you very much!
 
Eduardo Marques
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh sorry I misread this thread ... you want to send from PC to mobile phone ... in terms of SMS gateways check http://kannel.org (opensource) or http://nowsms.org (commercial)
[ March 01, 2006: Message edited by: Eduardo Marques ]
 
Ramesh Chandra
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi fedai,
u can tryout the simplewire protocol for sending SMS from java.
Just download the SDK and u will have some samples for executing
u can reach there at www.simplewire.com

Bye
Ramesh Chandra
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I'm developing a project a part of which sending SMS messages from Java.
I've attached a phone to my PC and can send messages quite comfortably.
The API that I use is jSMS 2-1-2.
To send a message you just need this part of code

service = new GsmSmsService();
service.init(config);
Message msg = new Message();
msg.setRecipient(�+411234567�);
msg.setMessage("Worked!");
//Connecting to the device
service.connect();
service.sendMessage(msg);

I'm going to send from 25 to 30 messages each time a use this project.
My question is do I need to create a new message (and/or service)
for each receipent or I need just do smth like this

for(int i=0; i<receipents.length; i++){
msg.setReceipent(NewReceipnet);
msg.setMessage(NewMessage);
service.sendMessage(msg);
}
(For performance purposes only?)
?
 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you provide me the link/url from where you have downloaded the API for jSMS 2-1-2?

I am not able to locate the same using Google.

Rgds,

Seetesh
 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried this link but it doesnt provide me a link to the API.

http://www.objectxp.com/products/jSMS/

Rgds,

Seetesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic