Search code examples
actionscript-3apache-flexairflex4

My AIR app is showing Allow Application to Check for Updates everytime it's open?


My AIR app is showing Allow Application to Check for Updates everytime it's opened? I'm using the ApplicationUpdater and ApplicationUpdaterUI classes and calling:

updaterUI.initialize(); 

at startup and then on UpdateEvent.INITIALIZED I call:

updaterUI.checkNow();

Is this correct?

Here is the screen I see:

enter image description here

BTW I click the "Check for Updates" button and it then says, "No updates available". I would think that on the next time it opens it would check in the background and only pop up a window when an update is available. This is how it seems to work on other AIR apps.


Solution

  • In ApplicationUpdaterUI set the isCheckForUpdateVisible property to false refer here for more on ApplicationUpdaterUI.(NOTE: A value set using this property overrides the setting in the update configuration file). This will stops the "Check for Update" window from displaying and only shows the update window when there is any update available. If you are using configuration file for UpdaterUI then set like this.

    <?xml version="1.0" encoding="utf-8"?> 
             <configuration xmlns="http://ns.adobe.com/air/framework/update/configuration/1.0" >
               <url>app:/server/update.xml</url>
               <delay>1</delay>
               <defaultUI>
                   <dialog name="checkForUpdate" visible="false" />
                   <!-- Other Configs -->
                   <dialog name="downloadUpdate" visible="true" />
                   <dialog name="downloadProgress" visible="true" />
                   <dialog name="installUpdate" visible="true" />    
               </defaultUI>
            </configuration>
    

    I hope this will helps you....