Flex on Android in Flash Player and AIR

This week at the Google I/O conference Adobe announced that a Flash Player 10.1 beta and an Adobe AIR prerelease are now available for Android devices. This is really exciting news for those of us building apps on the Flash Platform because now we can begin building apps in Flex for these mobile devices (and many others coming soon).

Take a look a some of the quick demos I’ve built with Flex running on Android in Flash Player and AIR:

You can get the source code for all of these demos from github.

Also Christophe Coenraets has posted some great Flex mobile demos. Check out his Employee Directory and Stock Trader demos.

These are very exciting times for developers!

If you want to check out the Flash Player 10.1 beta for Android it will be available in the Android Marketplace for Android 2.2 devices. You can try Adobe AIR for Android today by signing up for the prerelease.

This entry was posted in Adobe AIR, Flash Player, Flex, Mobile. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
  • http://sebastien-arbogast.com Sebastien Arbogast

    Too bad he’s cheating! ;o)
    Since there is no UI toolkit for mobile apps, he’s forced to tinker something with a big sliding group. This is nowhere nearly as productive and robust as iPhone view controllers. Do you know where we are with Slider?

    • http://www.jamesward.com James Ward

      Flex works fine as a UI toolkit for mobile apps. :) I’ve also tried Reflex, Razorberry, Minimal Components, etc and they all work well. Slider is actively being developed.

      • http://sebastien-arbogast.com Sebastien Arbogast

        How are default CheckBox or DropDownList adapted to a small touch screen? Sure we can develop skins but it should be more straightforward. How about specifying a keyboard type (email address, numeric, etc.) for text fields?

        • http://www.jamesward.com James Ward

          There is still more work to do to optimize the components and development experience for mobile profiles and interaction models. But the basic building blocks are there now.

  • http://blog.wheelerstreet.com Paul

    This is great! While I don’t have a device I do have an emulator with Android 2.2 but there is no Marketplace app for the emulator and Flash 10.1 isn’t installed. Anyone been able to get it installed on the emulator?

  • Bjorn Schultheiss

    Great demo,
    The touch screen response performance doesn’t seem as fluid as most iphone apps though.

    • http://www.jamesward.com James Ward

      These are still beta / prerelease runtimes and Flex hasn’t been optimized yet for mobile devices. So responsiveness should continue to improve as the runtimes and Flex are more optimized.

  • http://www.nacho-lopez.com Nacho López

    One question James,

    I may in the future compile AIR applications for Android directly from Adobe Flex SDK?

    Thanks!

    • http://www.jamesward.com James Ward

      The Flex SDK contains the AIR SDK. But the Flex SDK’s that are in production today don’t have the required AIR SDK version to create Android apps. If you join the AIR for Android prerelease you can download the newest AIR SDK and overlay it on top of an existing Flex SDK. Then you can create Android apps in the Flex / AIR SDK. Make sense?

      • gerbay

        Hi James

        How to make an Android apk from an air app? I have made a sample air app with air2.5 sdk but I can’t get an apk , I tried this on windows :
        adt -package -target apk -storetype pkcs12 -keystore
        certificat.p12 -storepass mypassword AirGrid
        AirGrid-app.xml AirGrid.swf icons

        Thanks for your help

        • http://www.jamesward.com James Ward

          That should work. Are you getting an error?

          • http://linkin-earth.net Aly Badawy

            Actually, I do. I can not find the ADT . it says (-bash: adt: command not found) although I have the Andorid SDK (ADB) installed, the froyo runtime for flex (device and emulator) .. I guess i am missing something else … please help!!

          • http://www.jamesward.com James Ward

            ADT is part of the AIR SDK. You should join the AIR for Android prerelease and download the documentation that covers how to use it.

          • aly badawy

            Thanks.. tjat was helpful… i just didn’t add the sdk path after i overlayed the android runtime…
            Thanks tho;

      • http://www.nacho-lopez.com/ Nacho López

        Thanks! :-)

  • Pingback: Scott Janousek » Blog Archive » Adobe AIR Team Blog : Mobile Enterprise Sample Applications Powered by Adobe AIR, Flex and Android

  • http://www.youngsmarket.com George

    I have been at this for weeks. I am using Flex Builder 4. When I change my compiler to use my newly created flex sdk it does not build the air package. Only when I use 4.0.0 does it build the air package. my problem is that the package namespace is not 2.5. So I am sure that I need to build the package using a different sdk (I thought I did it right) ? Is this even possible to get it to run on my HTC Incredible?
    note: My original mxml file has both as3 and flex tags does that matter?

    • http://www.jamesward.com James Ward

      Do you have the latest AIR 2.5 Prerelease overlaid on your Flex SDK? That will enable you to use the 2.5 namespace and target an apk file. Using AS3 and MXML is fine. You app should run on an HTC Incredible when it’s updated to Android 2.2 / FroYo.

      • http://www.youngsmarket.com George

        I have all these things: latest Adobe Air from prerelease on my phone. I made my app into an apk file. There do not seem to be any bugs. The app works great in Air on the desktop. So when I go to my apps on my phone I see my cool icon and try and launch the app. I get a Sorry your application MyApp process app.MyApp has stopped unexpectedly. So my app wont work on a phone? When Or Will my HTC Incredible get Android 2.2? And will I just go to the marketplace or will it happen over the air?

        I even stripped my app down to be just a panel with text that says “hi”. I get the same error

        Thanks
        George

        • http://www.jamesward.com James Ward

          You must have Android 2.2. I’m not sure when it will be available for your phone.

          • http://www.youngsmarket.com George

            So all the prerelease builds does not really work?

  • shyam

    Step1:-
    adt -certificate -cn SelfSign -ou Dev -o “Example” -c US 2048-RSA cert.pfx password

    Step2:-

    adt -package -target apk -storetype pkcs12 -keystore ../codesigningCert.p12 HelloWorld.apk HelloWorld-app.xml HelloWorld.swf

    EX:-

    C:\Documents and Settings\Admin\Adobe Flash Builder 4\HelloWorld\bin-debug>adt -
    package -target apk -storetype pkcs12 -keystore cert.pfx HelloWorld.apk HelloWor
    ld-app.xml HelloWorld.swf

  • Abhi

    Great article,
    Question on hosting a Flex and SQLite AIR app. How exactly we should go about it. If I have to share this common SQLite db file to other app users, then do I need to keep the db file somewhere else? like a host server?

    Say for example , I have to make a trip expense split application between 4 friends. So how and where should I keep my DB file?

    Any reccomendation will be appreciated.

    Regards,
    Abhi.

    • http://www.jamesward.com James Ward

      Then you couldn’t use the SQLite for that since it’s only for local files. For remote data you need to expose a database as some form of web services (REST, JSON, SOAP, AMF, etc) and then call those services from the app.

      • Abhinav

        Thanks for prompt response,

        So in this case do you know any free server places where I can kick start, as this will be my first application using this.
        Or Is there any similar sample available somewhere?

        Regards,
        Abhi.

        • http://www.jamesward.com James Ward

          You can really use anything. But I recommend you look into stax.net. It’s a really great place to get started building cloud + client apps.

          • Abhinav

            Thanks James,
            I will look into this and will keep you updated. I am really excited to do this.

            Regards,
            Abhi

  • Alex

    Hi,

    are there any examples or tutorials you know of for building a simple Augmented reality app for android using Flex (if at all possible of course).

    Thanks

    • http://www.jamesward.com James Ward

      That certainly is possible, but I don’t know of a tutorial that walks through it other than just a plain old FLAR Toolkit one. Like this one:
      http://www.cornflex.org/?p=66