<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/02/air-api---intro-to-the-updater.html" />
  <link rel="self" type="application/atom+xml" href="http://www.insideria.com/atom.xml" />
  <id>tag:www.insideria.com,2009://34/tag:www.insideria.com,2008://34.22907-</id>
  <updated>2009-11-16T15:54:11Z</updated>
  <title>Comments for AIR API - Intro to the Updater (http://www.insideria.com/2008/02/air-api---intro-to-the-updater.html)</title>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.21-en</generator>
  <entry>
    <id>tag:www.insideria.com,2008://34.22907</id>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/02/air-api---intro-to-the-updater.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blogs.oreilly.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=34/entry_id=22907" title="AIR API - Intro to the Updater" />
    <published>2008-02-18T12:49:47Z</published>
    <updated>2008-02-18T12:58:53Z</updated>
    <title>AIR API - Intro to the Updater</title>
    <summary>

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.  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).</summary>
    <author>
      <name>David Tucker</name>
      <uri>http://www.davidtucker.net/</uri>
    </author>
    
    <category term="Blogs" />
    
    <content type="html" xml:lang="en" xml:base="http://www.insideria.com/">
      <![CDATA[<div class="ap_r" style="margin: 0 16px 16px 16px;"><a href="http://www.insideria.com/airLogo-Shadow.jpg" class="highslide" onclick="return hs.expand(this)"><img src="http://www.insideria.com/airLogo-Shadow.jpg" alt="airLogo-Shadow.jpg" title="Click to enlarge" width="148"/></a></div>

<p>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.  </p>

<h2><strong>API Update Support</strong></h2>

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

<ul>
<li><a href="http://livedocs.adobe.com/labs/flex3/langref/flash/desktop/Updater.html" target="_blank">ActionScript Reference</a></li>
<li><a href="http://livedocs.adobe.com/labs/air/1/jslr/flash/desktop/Updater.html" target="_blank">JavaScript Reference</a></li>
</ul>

<p>This class has one public method (outside of the constructor), <code>update</code>.  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.</p>

<h2><strong>Steps to Update an AIR Application</strong></h2>

<p>Updating an application takes a few steps.  As you might have noticed, the <code>update</code> method of the <code>Updater</code> 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.</p>

<ol>
<li>Determine the update version string for your application (the new version you will be updating to)</li>
<li>Download the correct version of that AIR application to local computer (preferably in the application resource directory)</li>
<li>Create an instance of the Updater class</li>
<li>Call the update method of the Updater class</li>
<li>AIR will shut down your AIR application, install the new version, and then restart the application</li>
</ol>

<p>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.</p>

<h2><strong>Conclusion</strong></h2>

<p>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.</p>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.22907-comment:2058101</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.22907" type="text/html" href="http://www.insideria.com/2008/02/air-api---intro-to-the-updater.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/02/air-api---intro-to-the-updater.html#comment-2058101" />
    <title>Comment from mohamed Ghaly on 2009-04-22</title>
    <author>
        <name>mohamed Ghaly</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Hi all<br />
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.<br />
also i want when i press a button on the pdf file send a variable to adobe air[flex]<br />
thanks in advance</p>]]>
    </content>
    <published>2009-04-22T14:10:48Z</published>
  </entry>

</feed
