dizzot / nativeapplicationupdater

Automatically exported from code.google.com/p/nativeapplicationupdater
0 stars 0 forks source link

new AIR updater breaks nativeapplicationupdater? #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I installed the new AIR update yesterday (10/13/2010) and now checkNow() 
doesn't download or install the installer.

Original issue reported on code.google.com by jason%di...@gtempaccount.com on 14 Oct 2010 at 5:10

GoogleCodeExporter commented 9 years ago
What OS you are using?
p.

Original comment by Piotr.Walczyszyn on 15 Oct 2010 at 9:52

GoogleCodeExporter commented 9 years ago
Mac OS X

Original comment by jason%di...@gtempaccount.com on 15 Oct 2010 at 1:30

GoogleCodeExporter commented 9 years ago
What error/problem do you get? 
I have the latest AIR on my Mac and it works without any issues...
p.

Original comment by Piotr.Walczyszyn on 15 Oct 2010 at 2:16

GoogleCodeExporter commented 9 years ago
Try also to use todays 0.4 release.
p.

Original comment by Piotr.Walczyszyn on 15 Oct 2010 at 2:17

GoogleCodeExporter commented 9 years ago
checkNow() still doesn't work for me, but using downloadUpdate() and 
installUpdate() does, using 0.4 (I didn't try this method in 0.3),

- Jason

Original comment by jason%di...@gtempaccount.com on 15 Oct 2010 at 2:38

GoogleCodeExporter commented 9 years ago
Do you run initialize() before checkNow()?
p.

Original comment by Piotr.Walczyszyn on 15 Oct 2010 at 2:57

GoogleCodeExporter commented 9 years ago
Yes, here is how I was doing it, the prompt worked fine, but it stopped 
downloading when I clicked "Yes":

private function initiateUpdateCheck(evt:Event):void
{
  if (monitor.available)
  {
    air_updater.updateURL = "http://myurl/download/update.xml";
    air_updater.addEventListener(StatusUpdateEvent.UPDATE_STATUS,checkForUpdates);
    air_updater.initialize();
    air_updater.checkForUpdate();
  } else
  {
    AirAlert.show("Network is not ready. Make sure you are connected to the    
         internet.","Error");
  } 
}

private function checkForUpdates(evt:Event):void
{               
   if (air_updater.currentState == "AVAILABLE")
   {
      if (air_updater.currentVersion < air_updater.updateVersion)
      {
         AirAlert.show("There is a new version available 
           ("+air_updater.updateVersion+"). Update?","Update Available",Alert.YES | 
              Alert.NO,updatePromptHandler,null,Alert.YES);

      } else {
      AirAlert.show("Your software is up to date.","No Update Available");
      }
   } 
}

private function updatePromptHandler (e:CloseEvent):void
{               
   if (e.detail == Alert.YES)
   {                    
      air_updater.checkNow();
   } 
}

Original comment by jason%di...@gtempaccount.com on 15 Oct 2010 at 3:06

GoogleCodeExporter commented 9 years ago
You shouldn't run checkForUpdate() right after initialize. Look at my post 
describing the process: 
http://www.riaspace.com/2010/10/building-nativeapplicationupdater-custom-ui/

Original comment by Piotr.Walczyszyn on 16 Oct 2010 at 10:33