This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

swt trayicon send sms  RSS feed

Stephen O'Connor
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 11445
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!