Air Application Auto-Update
There is a SDK at Adobe Labs
with a beta of Air Application Updates. There are 2 ways, using the UI update and the headerless update. The headerless allows you to make updates and checks without the end-user knowing the checks.
Lets make a small example.
Short Description:
1.) Local AIR Application read local config file.
2.) The config file points to external (online) config file.
3.) Online Config file holds online released update and path to file.
4.) If file is never, download and upgrade
1.) Download the SDK
1.1) Download the files from Adobe Labs AIR Update Framework
.
1.2) Put the 2 *.swc file into your app-folder/sdks/3.0.0/libs/air
2.) Create a Project
2.1) Well, you know how to create a Flex AIR Project =)
3.) The Local Settings File
3.1) Create an XML file in the project (mine is config.xml)
3.2) Change the url path where the online pointer file is.
3.3) If using the GUI version of update change the settings in defaultUI
<configuration xmlns="http://ns.adobe.com/air/framework/update/configuration/1.0">
<url>http://www.undefined-type.com/update-buxfer.xml</url>
<delay>1</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>
4.) Create the Online Pointer File
4.1) Create the XML file, (mines called update-buxfer.xml) this is so that I put all my pointer xml file at 1 place on my server.
4.2) Fill the file with example code.
<update xmlns="http://ns.adobe.com/air/framework/update/description/1.0">
<version>1.4</version>
<url>http://undefined-type.com/apps/buxfer_1.4.air</url>
<description>
<![CDATA[
This update enables automatic updates in the future.
]]>
</description>
</update>
5.) The actual file
5.1) Don’t forget to put the actual new *.air file on the server where you are pointing =)
5.2) When building make sure as well to change the “version” in the application xml file.
6.) The Code
6.1) When you want to check the update just add this code.
import
air.update
.events
.UpdateEvent
;
import
air.update
.ApplicationUpdaterUI
;
private
var
updater : ApplicationUpdaterUI;
private
function
check(
)
:void
{
var
confFile : File = File.applicationDirectory
.resolvePath
(
"config-template.xml"
)
;
updater = new
ApplicationUpdaterUI(
)
;
updater.configurationFile
= confFile;
updater.addEventListener
(
UpdateEvent.INITIALIZED
, onInit)
;
updater.initialize
(
)
;
}
private
function
onInit(
event:UpdateEvent)
:void
{
updater.checkNow
(
)
;
}
分享到:
相关推荐
AirPlay+DMR+Pro+1.7.5-NoUpdate.apk
Wiley.Adobe.AIR.Bible.Oct.2008.eBook-DDU.pdf
air.2m.gauss.2021.nc
2、使用前需要更改drivers/air/air.h文件中的宏定义 //按需求更改型号 #define AIR2XX_SUPPORT //#define AIR720_SUPPORT 代码功能 (根据需求在main.c中更改执行的函数即可测试) 实验1 GSM接电话 实验2 GSM...
adobe air runtime version 33.1.1.744 for Mac adobe air runtime(电脑air运行环境) Mac版本
adobe air runtime version 33.1.1.744 for windows adobe air runtime(电脑air运行环境) windows版本
Unofficial AirPlay Protocol Specification.pdf
air flow ppt模板.ppt
air conditioner mannual chinese.pdf
如果你有台iPhone手机, 或者苹果iPad平板电脑,那么你可以很方便得利用苹果iOS系统内置AirPrint功能WiFi无线打印照片,Word,PDF等各种文件到你的Air Printer打印机,但有个前提是你的打印机必须支持苹果Air Print...
出版时间:Dec.2008.eBook-DDU 出版社:Wiley 作者: HyungG.Myung(Qualcomm/FlarionTechnologies,USA) DavidJ.Goodman (PolytechnicUniversity,USA)
macbook air2021和macbook air2021哪个好.docx
iPad Air2和iPad Air有什么不同.docx
adobe air runtime version 50.2.4.1 for windows adobe air runtime(电脑air运行环境) windows版本
Nike AIR气垫发展史.pptx
macbookair配置怎么样.docx
Macbook Air显卡是什么.docx
iPad Air对比iPad 4.docx
iPad Air如何预订?.docx