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?
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