jQuery in Action, 3rd edition
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "swt trayicon send sms" Watch "swt trayicon send sms" New topic

swt trayicon send sms

Stephen O'Connor

Joined: Oct 19, 2010
Posts: 11

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.

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10836

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!]
I agree. Here's the link: http://aspose.com/file-tools
subject: swt trayicon send sms
It's not a secret anymore!