牧羊岛

懒是不会有好果子吃滴//

导航

AIR custom ApplicationUpdaterUI

Posted on 2012-10-10 13:39  牧羊岛  阅读(648)  评论(0)    收藏  举报

自定义界面

http://www.websector.de/blog/2009/09/09/custom-applicationupdaterui-for-using-air-updater-framework-in-flex-4/

自定义从文件更新

http://help.adobe.com/zh_CN/AIR/1.5/devappsflash/WS5b3ccc516d4fbf351e63e3d118676a5d46-8000.html

 

 

installFromAIRFile 这个方法怎么个用法,为什么需要DOWNLOADED状态呢?

 

这个留用,解决方案在此啊,可是,依旧不能自定义界面啊

http://old.nabble.com/Update-AIR-application-from-a-local-system-path.-td28520678.html#a28520678

不能支梯子的看下面:

My Problem is i want to update my AIR application from a local system path, it can be central download location or a third app which is monitoring the updates, which downloads the new AIR file to the central location. 

I have tried using installFromAIRFile method from the ApplicationUpdaterUI class to update my application, but no success. I suspect I might be using this message incorrectly. I have attached below the code snippet what i have tried. 

public function updateApplication1():void{
                                var airFile:File = File.desktopDirectory.resolvePath("UtilityWizard.air");             
                    _appUpdater = new ApplicationUpdaterUI(); 
                    _appUpdater.updateURL = airFile.url;             
                    _appUpdater.addEventListener(UpdateEvent.INITIALIZED, updateIntializeHandler);            
                                _appUpdater.addEventListener(StatusFileUpdateEvent.FILE_UPDATE_STATUS, fileUpdateStatusHandler);
                                _appUpdater.addEventListener(StatusUpdateErrorEvent.UPDATE_ERROR, updateErrorHandler); 
                                _appUpdater.initialize();
                        }

  
private function updateIntializeHandler(e:UpdateEvent):void {
                   var airFile:File = File.desktopDirectory.resolvePath("UtilityWizard.air");
                    _appUpdater.installFromAIRFile(airFile); 
                } 

 private function fileUpdateStatusHandler(e:StatusFileUpdateEvent):void{        
                Alert.show(e.available.toString());        
                }

                private function updateErrorHandler(e:StatusUpdateErrorEvent):void{ 
                Alert.show(e.text); 
                } 


Please guide me to the correct path, or that is something not possible. 

Thanks in advance 

Vishal