Adobe Update framework for Flex Mobile does not work on desktop. Gives Error 1009 -
following output on console:
[swf] autoupdate.swf - 3,204,024 bytes after decompression private function onerror(event:errorevent):void [errorevent type="error" bubbles=false cancelable=false eventphase=2 text="unhandled exception typeerror: error #1009: cannot access property or method of null object reference." errorid=1009]
my code in application create event (s:viewnavigatorapplication)
protected function viewnavigatorapplication1_creationcompletehandler(event:flexevent):void { setapplicationversion(); appupdater.delay = 1; appupdater.isdownloadprogressvisible = true; appupdater.isdownloadupdatevisible = true appupdater.isinstallupdatevisible = true; appupdater.isfileupdatevisible = true; appupdater.updateurl = "http://localhost/updater/update.xml"; appupdater.ischeckforupdatevisible = false; // sajjad false appupdater.addeventlistener(updateevent.initialized, onupdate); appupdater.addeventlistener(errorevent.error, onerror); appupdater.initialize(); } private function onerror(event:errorevent):void { //alert.show(event.tostring()); trace("private function onerror(event:errorevent):void"); trace(event); } private function onupdate(event:updateevent):void { trace("private function onupdate(event:updateevent):void"); appupdater.checknow(); // go check update } }
i have added http://www.adobe.com/devnet/air/articles/air_update_framework.html
can case trying export flex mobile application desktop application , need create desktop project ?
its better advice need create separate project mobile application (viewnavigatorapplication) , desktop air(windowedapplication) both different. air application updater framework supports air(desktop) applications, if need application updater native application such .exe or .dmg(mac) can use external native application updater library.
air application updater:
native application updater:
http://www.riaspace.com/2010/08/nativeapplicationupdater-updater-for-air-apps-packaged-with-native-installers/ http://code.google.com/p/nativeapplicationupdater/
these updater frameworks don't support mobile applications. since mobile applications (apk-android , ipa-ios) native installers mobile have different update mechanism you need launch new version in appstore(ios) or playstore(android).
refer docx mobile application update: http://help.adobe.com/en_us/air/build/ws901d38e593cd1bac-77bd3ea112e2c0a7ed0-8000.html
Comments
Post a Comment