New in 10.5: Develop Mobile AIR Applications for Android

Latest EAP of IntelliJ IDEA 10.5 supports full cycle of Mobile AIR applications development: write code, compile, package, install, run and debug on emulator or Android device! Let’s look at common development workflow.

Prerequisites

  • Prepare your computer and Android 2.2+ device for development. Enable USB debugging on the device. Windows users probably need to install a USB driver (included in AIR SDK 2.6) and disable firewall (Vista, Windows 7) or open ports 7 and 7936 (XP).
  • Download Flex SDK 4.5 and extract it to any folder on your computer. Alternatively if you already have Flash Builder 4.5 installed you can use SDK included in its installation.

Note: Pre-release versions of Flex SDK 4.5 are not supported. Use Flex SDK 4.5.0.20967.

Project Setup

Basically, all you need to create AIR mobile project in IntelliJ IDEA is to create a module of ‘ActionScript/Flash/Flex’ type that uses SDK of ‘AIR Mobile’ type. Just go through simple steps using File | New Project wizard. When doing it first time you need to click [...] button and add AIR Mobile SDK pointing to the Flex SDK 4.5 installation.

As soon as a project is created it is recommended to configure default run configurations for the project. Click Run | Edit Configurations, expand ‘Defaults’ node and select ‘AIR Mobile’ run configuration. For example, if by default you are going to debug applications on Android device over USB you should set options in the same way as on the following screenshot.

Now write some code, connect your device to the computer and launch the application.

In a few seconds the application will start on the device!

If you need to use custom AIR application descriptor file – generate it using Tools | Flex | Generate AIR Application Descriptor action and then update it in a way you need. Create run configuration based on your descriptor file (in opposite to the example above where ‘MobileApp2′ run configuration is based on application main class and descriptor file is generated by on the fly).

To package native Android application as well as iOS application use Tools | Flex | Package Mobile AIR Application.

Your feedback is always welcome in our forum and issue tracker!

This entry was posted in New Features and tagged , , , , . Bookmark the permalink.

12 Responses to New in 10.5: Develop Mobile AIR Applications for Android

  1. #offtopic (sorry, but I really dont know where I can get answer for these questions)

    Hi,

    When we can get Idea 10.5 (Release) !?
    And, where I can find some information about – what does it mean EAP !?

    Thanks.

  2. Oh, just found – EAP – Early Access Program! :)
    what about first question !? :)

  3. Alexander Doroshko says:

    IntelliJ IDEA 10.5 release is expected in middle-May

  4. James says:

    Are they plans to support the same for iOS devices when Flex support its? The unreleased dev builds of Flash Builder support deploying / development on the iOS platform so I’m hoping as soon as they do, IDEA adds support for it to.

    Also can you clarify that the primary difference between Flex mobile development using Flash Builder 4.5 and IDEA will the the WYSIWYG UI builder in Flash Builder? Or will there be other functional gaps?

  5. Felix says:

    Great news, will try it out immediately!

    Btw.: You have a typo in the second Flex SDK link, it should be 17689 at the end, as in the other link.

  6. Alexander Doroshko says:

    @James: Packaging of.ipa applications for iOS devices will be available in the next EAP (see Tools | Flex | Package Mobile AIR Application). To install it on the device you can use iTunes. Of course iOS and Blackberry support will be improved. MXML UI designer for IDEA is in progress. IDEA’s unbeaten advantage is great coding assistance. Any missing functionality will be added by user’s requests.

    @Fleix I can’t find a typo. Indeed there are mentions of both 4.5.0.17689 and 4.5.0.19786 because the first one contains mobile components and the second one contains debugger that communicates with Android devices over USB.

  7. Chris says:

    Very impressed, given some time and improvements on UI and workflow you guys will take over as3 development, keep up the great work !

  8. James says:

    Great to hear. btw did support for packaging .ipa applications on iOS devices make it in the May 5th EAP? I don’t see it mentioned in the release notes. Is there an issue in tracker that I can watch.

  9. Alexander Doroshko says:

    @James: Yes, IDEA supports packaging iOS applications. See Tools | Flex | Package Mobile AIR Application. Note that to pack IPA you need to have provisioning profile and personal certificate converted to P12 format.

  10. Wim Deblauwe says:

    I just tried this, but it does not work. The version that you can download now is 4.5.0.20967, but there seems to be no ‘MobileApplication’ class in there. There is a ‘mobilecomponents.swc’ but that does not seem to contain much.

    Any pointers to make it work?

  11. Alexander Doroshko says:

    @Wim: In Flex SDK 4.5 release Adobe has renamed MobileApplication to ViewNavigatorApplication. I’ll update this blog post accordingly.

  12. Wim Deblauwe says:

    Thanks Alexander. It seems there are quite some changes. There is a partial list here: http://devgirl.org/2011/04/27/updating-flash-builder-burrito-applications-to-flash-builder-4-5

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>