Home  >  

AIR API - Intro to the Updater

Author photo
| | Comments (1)
AddThis Social Bookmark Button
airLogo-Shadow.jpg

One of the most useful and exciting elements of the AIR API is the Update capability. This capability is further enhanced by the freedom AIR gives the developer in how to integrate this functionality.

API Update Support

Update support within AIR is handled by the flash.desktop.Updater class (note that this is in the flash.desktop package and not flash.system from some of the earlier beta versions of AIR).

This class has one public method (outside of the constructor), update. This method is not static, so you will have to instantiate the class to have access to this method. The update method takes two arguments: a File object that corresponds to the new AIR file, and a string that corresponds to the version of the new AIR application.

Steps to Update an AIR Application

Updating an application takes a few steps. As you might have noticed, the update method of the Updater class takes a File object for the first argument - not a URL. You will have to perform the following steps to update your AIR application.

  1. Determine the update version string for your application (the new version you will be updating to)
  2. Download the correct version of that AIR application to local computer (preferably in the application resource directory)
  3. Create an instance of the Updater class
  4. Call the update method of the Updater class
  5. AIR will shut down your AIR application, install the new version, and then restart the application

Some developers have commented that this update process seems cumbersome, but it leaves open the door for developers to integrate update functionality in their applications anyway they see fit.

Conclusion

Now that you have a basic understanding of the classes and methods involved in the process, I will actually put this into practice for the next article which will actually demonstrate this process from beginning to end. If you have any specific questions regarding the update process, leave a comment and hopefully I can address it in the next article.

Read more from David Tucker. David Tucker's Atom feed

Comments

1 Comments

mohamed Ghaly said:

Hi all
Can any one tell me how can i access a pdf file from adobe air [flex] to invoke some actions on it and send to it an variable.
also i want when i press a button on the pdf file send a variable to adobe air[flex]
thanks in advance

Leave a comment


Tag Cloud

Poll: Mobile Features

What feature do you use most on your mobile phone?

Vote | View Poll Results | Read Related Blog Entry

Latest Features

Recommended for You

@InsideRIA on Twitter

Archives

  • Or, visit our complete archive.  

About This Site

Welcome to the premiere community site for all things RIA sponsored by O'Reilly Media and Adobe Systems Incorporated.