7 Replies Latest reply on Aug 12, 2008 11:08 AM by Oliver Goldman

    Packaging and Delivering AIR Apps

    Jaz Chana
      Hi Guys,

      I have an issue. I have a config file in my air application that I want change depending on what user it is being delivered to. The number of users could be extremely large, possibly in their hundreds so to have to change the config file again and again by hand is unfeasible. I had an idea to automate this process with a web app that will take some user information and use it to update the details in the config. However what I am struggling with is whether to compile the app, open the it up in java and change the config file. Or whether to adjust the config file first, than compile the air app.

      I know how to view and read the config files in the air app from a java program once the air app has been compiled, but writing to those files is alluding me at this time. What I know nothing about however, is compiling an air app with a java program.

      Has anybody else had this problem? How did you go abouts solving this? What are your reccomendations?

      Any help would be extremely useful.
        • 1. Re: Packaging and Delivering AIR Apps
          duncanhall Level 1
          How about not including the config at all, and then downloading and storing the correct version from a server once the user has installed the app?
          • 2. Re: Packaging and Delivering AIR Apps
            Jaz Chana Level 1
            That would require a larger amount of user input than I want. Having the user download the file and then having to place it in a specific location on the file system is asking too much of our users who are not very computer literate anyway. I want the user experience to be seamless :).
            • 3. Re: Packaging and Delivering AIR Apps
              duncanhall Level 1
              It doesn't need to require any user interaction at all, as long as you have some logic in the app that can determine which "version" of the config file is needed.

              Just transparently download the file in the background on first run, then store it in the application storage directory. This requires no user interaction whatsoever, means that one single build can deployed with an unlimited number of pssible configurations and makes it easy to update the config file in the future.
              • 4. Re: Packaging and Delivering AIR Apps
                Jaz Chana Level 1
                quote:

                Originally posted by: duncanhall
                It doesn't need to require any user interaction at all, as long as you have some logic in the app that can determine which "version" of the config file is needed.

                Just transparently download the file in the background on first run, then store it in the application storage directory. This requires no user interaction whatsoever, means that one single build can deployed with an unlimited number of pssible configurations and makes it easy to update the config file in the future.



                Oh I see where your coming from! Very Good idea, I like it a lot. I may actually use this implementation. Thank you for your suggestion.
                • 5. Re: Packaging and Delivering AIR Apps
                  Jaz Chana Level 1
                  Just out of interest though, how do I go about compiling an air app from a java app.
                  • 6. Re: Packaging and Delivering AIR Apps
                    duncanhall Level 1
                    As far as I know, you don't.
                    • 7. Re: Packaging and Delivering AIR Apps
                      Oliver Goldman Adobe Employee
                      [I think by "compiling" you are actually referring to the processing of packaging your application as an .air file. I'm going to use the term packaging in my reply.]

                      You can package an AIR application from Java by invoking the "adt" command, which is included in the SDK, via Java's Process API.

                      What you can't do, however, is open up an existing .air file, change it, and expect it to work. Modifying it will invalidate the signature and the application will not be installable.

                      In general, customizing the .air file per-user is a difficult thing to do. Downloading a separate file as suggested here is probably a better solution.