3 Replies Latest reply on Oct 6, 2008 9:06 PM by Dr. Fred Mbogo

    How can I update the contents of my AIR App?

    vectorhog2
      I have an Adobe AIR slideshow app built with flex 3. The app is packaged with an xml playlist and slides of various types, swf, jpg mov) When I package the app it includes all of these contents. I want to be able to update the contents, add new slides change the playlist, etc, and send a new version to my client. The problem is that when my client downloads the new version it only update the mxml part of the app and not the contents. Does anyone know how to fix this?

      For now I'm changing the app name as well as the version but my that makes my poor client have a dozen different versions of the app in his applications folder.
        • 1. Re: How can I update the contents of my AIR App?
          Dr. Fred Mbogo Level 1
          Bundling the data with the application makes sense when the data are static. Default data, for example.

          When it's dynamic, it's better to have the app download the data at run time. Then it's always fresh.

          To avoid having to download the same data again and again, you can put a version.xml file in the web directory alongside the other data files containing just version numbers for the other files. Your app downloads that on startup, compares the version numbers within with what it knows about the versions it currently has (which it stores locally on disk), and updates only the pieces that have changed since the last run.

          Fetching this tiny little XML file will be quick, and optional. If the user is offline, they continue with the previous data files. When they get online, their local copies get refreshed as needed.
          • 2. Re: How can I update the contents of my AIR App?
            vectorhog2 Level 1
            Thanks for the reply. That sounds reasonable, but I haven't a clue on how to implement it. Do you know of any examples or tutorials?
            • 3. Re: How can I update the contents of my AIR App?
              Dr. Fred Mbogo Level 1
              Read in the manual about URLRequest and URLLoader. The example code covers it.

              As for parsing the version.xml file, look in the manual under E4X.