I would like to create a simple AIR app that show’s a notification on the bottom right of the users screen. this app won’t show all of the time, it will just show if I push a new notification to the users computer. I am doing this in Dreamweaver. It will open on Windows XP computers only.
So far I have found out how to show a notification window with my html file:
notification.load( new air.URLRequest( HTML_SOURCE ) );
What I am not clear on is:
- how to have this happen automatically on login.
- how the AIR app can check if a new msg is available.
- how best to exit the app
Thanks for any help!
For starting application on login, you have to set
air.NativeApplication.nativeApplication.startAtLogin = trueFor details u=you can have a look at this adobe article.
You can store messages with a increasing message_id column. So when your application shows any message it can store that value as last_message_read in your data. Then you can use this value to check if new messages are available (You will have to save this variable in a file)
For exiting application you can use
air.NativeApplication.nativeApplication.exit();or just close your main application window by
close(). It will automatically close your application.