3 Replies Latest reply on Oct 21, 2011 5:02 PM by drkstr_1

    Flex AIR to Flex Mobile

    RiccardoB.

      I've made using Flash Builder 4.5 a Flex 4.5.1 AIR project for the desktop and I want to convert it to a Flex Mobile for using also on Android.

       

      Is it possible?

        • 1. Re: Flex AIR to Flex Mobile
          drkstr_1 Level 4

          In theory, yes.

           

          In practice, you probably made a lot of design decisions with your air app that do not translate well to mobile. This is a fair assumption to make, unless you designed your app from the ground up to be deployed on mobile.

          • 2. Re: Flex AIR to Flex Mobile
            RiccardoB. Level 1

            Thanks for the reply.

             

            I know that will be many things to fix like dimensions and components (as example I used s:dropdownlist, that are missing a mobile skin).

             

            But what is the to procedure to obtain the mobile version in Flash Builder 4.5?

             

            I have to create a new Flex Mobile project and manually copy/paste all the files?

            Is it possible to export directly an Android .apk from a Flex AIR project?

            I can install directly an .air on Android?

            • 3. Re: Flex AIR to Flex Mobile
              drkstr_1 Level 4

              The answer to your last question is no, it doesn't work like that. The final build needs to be configured and optimized for the target platform.

               

               

              What you need to do is put a little bit of thought into your project design so that you can split up your shared code from the code that is platform dependent. The shared code would go in a separate library project and is used by your main application.

               

              You then create a project (or configuration, if using an advanced build environment) for every platform you plan to deploy to (desktop, mobile, web, etc). The main app should contain little to no code. Mostly it just serves as a wrapper to the shared library code. This allows the main app to be configured and optimized for the target platform while allowing you to use a shared library across platforms.