O'Reilly logo

Adobe AIR 1.5 Cookbook by Koen De Weggheleire, Koen DeWeggheleire, Marco Casario, David Tucker, Rich Tretola

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Taskbar and Dock Integration

By leveraging taskbar and Dock functionality in your AIR application, you can enhance your application’s usability. This ability is especially useful when you want to notify the user that an event of interest has occurred.

On Windows, you can place an additional representation of your application (other than the taskbar button) in the form of an icon in the system tray (also called the notification area) of the taskbar. On a Mac, you can place an icon referencing your application in the Dock when the application is running. To get the attention of the user when something important happens, you can make a system tray icon flash (Windows) or the Dock icon of your application bounce (Mac).

On both operating systems, you can also add menus to the icons in the system tray or Dock.

Because the implementations in this chapter are operating system specific, it is a best practice to first check which operating system and associated icon is supported on the user’s computer. You can check which icon types are supported using the static NativeApplication properties: supportsDockIcon and supportsSystemTrayIcon. Both types of icons support menus and custom images, but Table 13-1 outlines some differences.

Table 13-1. Icon Type Differences

System Tray Icon (Windows)

Dock Icon (Mac)

This icon is visible only when you set an image.

This is always visible, showing the image specified inside the application descriptor, unless you set a different image.

You can set tooltip ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required