This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes swt trayicon send sms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "swt trayicon send sms" Watch "swt trayicon send sms" New topic
Author

swt trayicon send sms

Stephen O'Connor
Greenhorn

Joined: Oct 19, 2010
Posts: 11
hi,

need some help please with swt trayicon.

I have a swt trayicon, that displays tooltip messages but what I want is to display an alert message to the user of the trayicon at specific times, for instance a message is displayed to the user "you have worked 6 hours" this message is to be displayed after 6 hours of the trayicon invoked to the "systray".

I dont want to stop there though, I also want an sms sent to the users moblie phone telling the user 6 hours has pasted.

my first question is possible with swt trayicon?

second question does anyone know of an example where trayicon alerts user with a trayicon message and trayicon sends a sms to the users mobile phone?

as usual any help would be much appricated.

Thanks.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

I don't know about SWT tray icon but the Swing TrayIcon has a method displayMessage() which can be used to interact with the user. You might want to check for something similar in SWT.

Sending SMS is a different ballgame altogether, which actually has nothing to do with the tray icon. To send out SMS you will need either a modem attached to the machine which is displaying the tray icon or use the services of sms gateway providers. These gateway providers usually expose an HTTP API which you can invoke from your application.

In pseudo code
1) Launch tray application
2) Run a timer task in the background. Something simple like javax.swing.Timer or even Quartz, depending on the complexity of your application. The purpose of such timer is to "wake up" after some specified period of time
3) When the timer wakes up a) Flash message on screen b)Send SMS


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: swt trayicon send sms
 
Similar Threads
SMS Textspeak Corrector in J2ME
How to Add a Systemtray Icon on several machines ?
Accessing the SMS Drafts Folder
SOS send SMS
How to specify the SMS port number for application using GSM modem