aspose file tools*
The moose likes Java Micro Edition and the fly likes Sending SMS from Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Sending SMS from Java" Watch "Sending SMS from Java" New topic
Author

Sending SMS from Java

fedai gandjaliyev
Ranch Hand

Joined: Dec 05, 2005
Posts: 99
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

Joined: Oct 28, 2005
Posts: 138

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.


Better, faster, lighter Java ... you mean Ruby right ?
SCEA5,SCBCD1.3,SCWCD5,SCJP1.4 - memories from my youth.
fedai gandjaliyev
Ranch Hand

Joined: Dec 05, 2005
Posts: 99
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

Joined: Dec 05, 2005
Posts: 99
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
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
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 ]

Ping & DNS - updated with new look and Ping home screen widget
Eduardo Marques
Ranch Hand

Joined: Feb 19, 2005
Posts: 231
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


Eduardo Marques
Get ready for your SCMAD certification at J2MECertificate.com - See what all the buzz is about ...
Jason Moors
Ranch Hand

Joined: Dec 04, 2001
Posts: 188
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

Joined: Dec 05, 2005
Posts: 99
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

Joined: Feb 19, 2005
Posts: 231
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

Joined: Oct 20, 2005
Posts: 17
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

Joined: Dec 05, 2005
Posts: 99
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

Joined: Feb 13, 2004
Posts: 244
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

Joined: Feb 13, 2004
Posts: 244
I tried this link but it doesnt provide me a link to the API.

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

Rgds,

Seetesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sending SMS from Java
 
Similar Threads
Library works with WindowsMobile SMS Box
Any Way To Send SMS through Java
Sending SMS to mobile phones from a java prog
requirement for development of j2me application
SMS using java