views:

207

answers:

1

This is the basics of what I have:

var onError = function() { alert( "error" ); }
var appUpdater = new runtime.air.update.ApplicationUpdaterUI();
appUpdater.configurationFile = new air.File( "app:/updateConfig.xml" );
appUpdater.addEventListener( air.ErrorEvent.ERROR, onError );
appUpdater.initialize();

I loaded in all the appropriate framework files, the updateConfig.xml and the updateDescriptor.xml, and the URLs are for a localhost instance. I get no errors, and if I call the INITIALIZED UpdateEvent property, it is initializing.

My updateConfig.xml:

<?xml version="1.0" encoding="utf-8"?> 
<configuration xmlns="http://ns.adobe.com/air/framework/update/configuration/1.0"&gt; 
    <url>http://virtual.sandbox.com:81/updateDescriptor.xml&lt;/url&gt; 
    <delay>0</delay>
    <defaultUI> 
     <dialog name="checkForUpdate" visible="true" />
     <dialog name="downloadUpdate" visible="true" />
     <dialog name="downloadProgress" visible="true" />
     <dialog name="installUpdate" visible="true" />    
     <dialog name="fileUpdate" visible="true" />
     <dialog name="unexpectedError" visible="true" />
    </defaultUI>
</configuration>

My updateDescriptor.xml:

<?xml version="1.0" encoding="utf-8"?> 
<update xmlns="http://ns.adobe.com/air/framework/update/description/1.0"&gt; 
    <version>1.1</version> 
    <url>http://virtual.sandbox.com:81/MyWidget.air&lt;/url&gt; 
    <description><![CDATA[This is the latest version of the DOI Express Reorder widget.]]></description>
</update>

The application descriptor version node is set to 1.0. Any help would be appreciated.

A: 

Don't use 0 for the delay tag.

<delay>0</delay>

A value of 0 means it does not perform a periodical update. Use 1 for once a day or use fractions like 0.25 for less.

mcchots