Toaster Notifications for AIR Apps using jQuery

User notifications have been a standard feature of our modern software applications for quite some time now. Growl has been around on Mac for years. Linux has libnotify and Windows has Snarl.

What options do AIR developers have to leverage the user’s native messaging system? None. Zero. Zip.

Adobe was supposedly working on this back in 2008, but we have yet to see one single deliverable bit of code. Seriously? It takes two years to integrate with one of the most standard core features provided by modern day operating systems? Titanium had this built into their Desktop SDK since practically day one.

Instead of integrating with the native notification system, AIR applications are left to “emulate” these notifications as a horrible, horrible hack. Eventually, someone over at Adobe thought it would be smart to put together a tutorial to appease developers demanding this feature. Unfortunately, AIR continues to be dominated by Flex folks and all of us HTML developers get left in the cold.

I was able to scrounge up a few existing Javascript libraries that work with AIR to emulate system notifications, but each is tied to a different Javascript framework:

Hey, where’s the jQuery love? Well, I guess it’s my call in life to fill the void! I’m happy to announce the jquery.air.notification plugin that brings Growl like notifications to your Javascript AIR app! The API is incredibly simple:

$.air.notify('hello world');

The code is available on GitHub. Just drop the Javascript and template files into your app and you’re good to go!

Features

  • 100% skinnable. This is the beauty of bringing web technologies to the desktop. CSS absolutely rocks for this kind of thing.
  • tiling of notification windows if multiple are received. This prevents the user from missing any notifications.
  • auto fade out after specified interval or click on popup to dismiss

Hit me up if you have any feature requests. I’m considering adding support for HTML notifications, but I’d like to hear some feedback from users first.

I still find it appalling that this is not something built directly into the AIR SDK and I am hoping that this library will become unnecessary sooner rather than later. In the meantime, this should greatly help AIR developers get started quickly and not need to reinvent the wheel.