Meaningless Drivel is fun!*
The moose likes Java Micro Edition and the fly likes SOS send SMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "SOS send SMS" Watch "SOS send SMS" New topic
Author

SOS send SMS

Stephen O'Connor
Greenhorn

Joined: Oct 19, 2010
Posts: 11
Hi all,

I have a couple of questions that I hope someone can take the time to answer...

first very briefly I will explain what I am trying to do, I have a swt trayicon that is launched by jnlp/jws it notifies the user at certain time intervals with a basic alert message. I want the users mobile phone to recieve a sms message at the same time as the trayicon alert message.

What I have done so far is installed j2ME.
Created a MIDlet suite with a JAD and JAR file.
Tested it in j2me OTA with the built in emulator it works fine sends an alert messge to the emulator phone with the current time.

Now for the questions

1. How do I launch the JAD file? I have tryed to launch from apache tomcat but alas I cannot make it work.
2. How do I open the emulator from the browser do I need another emulator besides the J2ME built in emulator such as MicroEmulator??
3. how to launch the JAD file at same time as the JNLP file?
4. Can I jar the my trayicon files with the MIDlet file or is the MIDlet send sms to be jared seperatly?
5. Is this easier to do in EclipseME?
6. Is there a limit to how many questions I can ask in one topic ?

thanks
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

JAD files are for deployment on mobile devices. You can't run them on desktops or webservers.

Your choice of IDEs doesn't make a difference. IDE's are used for development, not production.

It actually sounds like you have a web application that you want to post SMS's to a mobile. Web applications themselves can't do anything without a request being made (they don't run asynchronously). However, you can create webapps that manage continuous threads that do stuff like that. For example, by using the Quartz Scheduler.

Getting the SMS from the server to the mobile devices is up to you. Many carriers have a "magic" email address that can be used to send SMS's from non-mobile sources. Or your app could use a web-based SMS gateway service if you have an unpredictable mix of carriers (since each carrier's "magic" email address is different).

----

Oh, and you can ask all the questions you want. But life will be simpler if you don't ask unrelated questions on a single message thread. We don't charge extra for multiple threads!


Customer surveys are for companies who didn't pay proper attention to begin with.
Stephen O'Connor
Greenhorn

Joined: Oct 19, 2010
Posts: 11
Tim,

thanks for the reply its a great help, no wonder I was havin so much trouble with those darn jad files..

Ok, so yes I have an excellent web application that has loads of cool features and I do want to send sms from my webapp but I want to send alerts to my users when the webapp is closed.

I created a swt trayicon that notifies the user when the parent webapp is closed..

What I now want to do is take a look at this Quartz Scheduler and see how I can run it with my java trayicon, hmmm is that right (I hope its as simple as that)?

As for the sms gateway at this moment all I want to do is send a sms to an emulator so I have downloaded SMPPsim. SMPPsim is this what you mean by a web-based SMS gateway service?

Thanks a mill, glad to read you don't charge EXTRA or should that be ANYTHING for multiple threads ?


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

stephen oconnor wrote:Tim,

thanks for the reply its a great help, no wonder I was havin so much trouble with those darn jad files..

Ok, so yes I have an excellent web application that has loads of cool features and I do want to send sms from my webapp but I want to send alerts to my users when the webapp is closed.

I created a swt trayicon that notifies the user when the parent webapp is closed..

What I now want to do is take a look at this Quartz Scheduler and see how I can run it with my java trayicon, hmmm is that right (I hope its as simple as that)?

As for the sms gateway at this moment all I want to do is send a sms to an emulator so I have downloaded SMPPsim. SMPPsim is this what you mean by a web-based SMS gateway service?

Thanks a mill, glad to read you don't charge EXTRA or should that be ANYTHING for multiple threads ?




You can use Quartz. It's fairly easy, although not totally trivial, since you have to set up a formal job process to run the scheduled request. Quartz is extremely sophisticated when it comes to scheduling.

For more basic scheduling, you can simply use the language built-in TimerTask functions.

For even more basic scheduling, you can use the Windows "run-at" command scheduler, but that actually launched a Windows shell command, so it's not a good fit for a continuously-running ToolTray app.
Stephen O'Connor
Greenhorn

Joined: Oct 19, 2010
Posts: 11
ok ok, I got Quartz Scheduler working heres a link to tutorials that I found very helpful if anyone else is intrested http://www.roseindia.net/quartz/download-quartz-scheduler.shtml these tutorials show how to set up quartz with eclipse.

my notifier is a swt window that pops-up at the scheduled times EASY

now for the send sms alert to my user this I am finding

I have downloaded smppapi and built it in eclipse I have tryed this tutorial http://onjava.com/pub/a/onjava/2004/06/09/sms.html?page=2 but cannot get the smsdemo to work in eclipse and I have smppsim up and running but do not know how to send an sms to it.

so where do I start?
1. create a sms sending application?
2. create a connection to a sms center?
3. bind?
4. send sms?

any help please with these questions would be great or anymore very helpful advice would be greatly appricated.

thanks.







Stephen O'Connor
Greenhorn

Joined: Oct 19, 2010
Posts: 11
hi all,

I have done some investigating and I have come up with this use SMPP protocol (to send my sms alert from my trayicon) as my mobile phone users will different mobile carriers

Carriers such as eircom, Vodafone, 3g ect.

I have downloaded installed SMPPSim to test my sms alert.

I have being reading about SMPP and what I have learned so far is that jsmpp is easiest way to send a sms to SMPPSim.
The problem I have is trying to get the jsmpp api to work using eclipse I have tried the web for any relevant information but I have not found anything up-to-date, there was a sms forum but this has closed down.

I want to send a sms alert from my trayicon to SMPPSim then to a mobile phone.

My first question does anyone know is it possible to use JSMPP with eclipse? the problem I am having is with the simplysubmitexample is failed to connect and bind to localhost port 2775.

If the answer to this question is no, can some please point me in the right direction I would like to send a basic alert using the SMPP protocol form my swt trayicon to SMPPSim.

I have searched this forum and a few other forums for jsmpp, there is no jsmpp section in this forum to post my question so that’s why I post it here.

thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SOS send SMS