I'm an AIR noob, but have a load of experience with
xhtml/ajax/web services etc. I'm hoping, therefore, to be able to
do this in ajax and not using Flex. My Flash is crap :-)
I want to build a simple desktop notifier. I'm having trouble
with two main "design pattern" approaches:
1. what is the best way to periodically check a web service /
minutes pings an xmlhttp request to the service, checks for changes
and then returns a result? Or is there a better way?
2. how to I write an AIR app that minimizes to the system
tray / dock yet pops up an alert when there is something new to
report. Christian Cantrell's notificationlib (
looked promising but I can't find any documentation and the example
doesn't work for me. I'm too much of a noob to be able to debug.
Pointers would be much appreciated - I've asked Google and
she know nothing :-)
1) yes, setTimeout with pinging the server should do the work
2) You can get the source code for the application Fresh on
can be minimized to tray and it displays notifications when new
entries are coming in.
Basically, minimize to tray can be seen as
- load a system tray /doc tray icon and add menu on it
- hide the main window of your application (it doesn't mean
it gets destroyed, just visible = false)
- continue to ping the server for changes and when one comes
in, create a new window with no chrome, position it n thue bottom
right corner of the window and display the message inside it.
This is the case when you build the notification system
yourself. However, as you pointed out, a better idea is to leverage
the notification lib that Christian built. And there is one
application that uses that and it's also an Ajax based application
built by Jonathan Snook > Snitter Twitter client:
Dragos Georgita | Adobe AIR Engineering