in AIR

Adobe AIR 3 Beta With Captive Runtime

Update: as others have mentioned in the comments, this is not just for mobile. You can now create desktop AIR applications that don’t require a separate runtime.

We recently launched the Adobe AIR 3 beta SDK that you can download on the Adobe Labs site. By far the most exciting feature for me is the new captive runtime support. This allows you to bundle the AIR runtime with your application rather than requiring the user to install it. When you build an AIR app for iOS this happens already as the AIR runtime is not allowed. This essentially brings that same workflow to Android.

This is important as many negative comments have been made about apps in the Android market because of the separate runtime requirement. So does this mean that all your apps should now use the captive runtime feature? Well that all depends. You obviously won’t get automatic updates when new versions of the AIR runtime are released. You will have recompile your app using a new captive runtime version. Your application will also increase in file size (~8mb) as you are now bundling the runtime. This hasn’t been a huge issue on iOS but it is something to think about.

Our newest evangelist, Andrew Trice, wrote a great blog post about this new feature so check it out if you want more details. It is very easy to create a captive runtime application as it is simply a new target (apk-captive-runtime) that you provide to ADT when you compile. See below for the new ADT options:

1
adt -package -target ( apk | apk-debug | apk-emulator | apk-captive-runtime ) ( CONNECT_OPTIONS? | -listen <port>? ) ( -airDownloadURL <url> )? SIGNING_OPTIONS <output-package> ( <app-desc> PLATFORM-SDK-OPTION? FILE-OPTIONS | <input-package> PLATFORM-SDK-OPTION? )

Write a Comment

Comment

35 Comments

  1. A video tutorial would be much appreciated, with instructions from installing AIR 3 SDK in Flash Builder and compiling an application bundled with captive runtime.

  2. It’s not just for Android, now you can use AIR to create projectors without the previous limitations. On desktop apps it seems to add about 36MB. Combined with Native Extensions and Stage3d, this opens a lot of doors for desktop development…maybe it’s time to get started on a Steamworks API wrapper for AIR :)

  3. This is a really tough call on weather or not to use Captive Runtime. I do get my share of negative comments about the RunPee app because I used AIR. I even included a “Why Adobe AIR” screen in the app to explain to anyone who cares why I did it that way. Of course that doesn’t help for those who just uninstall the app right away without trying it. I got a comment about that just the other day: “Just say no to AIR! Bye bye app.”

    Some people say that AIR bogs down their phones performance because it runs in the background all the time. I wish we could educate everyone that it does no such thing but that’s just not possible.

    On the other hand those people make up a very small percentage of my users so do I want to punish the other 99% of my users by sucking up 8 extra megs of storage space on their phone? I’m probably not going to myself. But it’s great to have the option.

  4. When the whole ‘Flash is Dead’ parade got going last year i was really starting to wonder whether Adobe would give up on Flash, but over the last year you guys continually and frequently keep upgrading Flash and AIR and making it better and better, You guys are the bomb! And AIR is more relevant now than it ever has been i’m loving building apps!

  5. Hi Lee,
    I am a great fan of your tutorials just wondered if you help me I am trying to install the flash carousel in the header of wordpress but its not reading the XML is it possible without xml

  6. 8MB is a too much for Android. I don’t even know any application for Android that is over 8MB :( And what if user happens to have a several of those AIR apps, it’s 8MB per app, that is really huge issue.

  7. this is great and all but PLEASE PLEASE PLEASE let AIR 3 finally have the ability to use 256 and 512 pixels sized icons for desktop applications.

  8. A bit of topic,
    In the latest AIR SDK 3.0.0.3690 it’s stated:

    Note: Stage3D for mobile will be enabled in a future release.

    Can you elaborate if it’s a matter of days, weeks or months. I would like to use it in a project of mine and the client would like to have a time table.

  9. I may be showing my ignorance of the underpinnings of flash player, but having separate includes in you files should be enough to include or exclude different parts of the player to package only the parts of the player used…

    Unless flash.display is 8MB on it’s own…

  10. I hate flex framework; it is because it is heavy in file size, and difficult to learn and use all the new(old) skin architecture, etc. I simply hate it. I don’t understand the reason why flex-framework exist. No wonder there are no blog posts about flex framework anymore.

  11. Hey Lee,
    I’ve got an urgent question to ask in regards to AIR 2.7 for IOS thats included in Flash CS5.5. Is URLLoaded and URLRequest with POST method allowed on it? I’m trying to run and call a PHP server online and I don’t seem to get it to work. Here’re the bit of the code:

    vars.r = Math.random();
    var submitLoader:URLLoader = new URLLoader();
    var newRequest:URLRequest = new URLRequest((actionTargetPath == null) ? fileAction : (pathBase+actionTargetPath));
    newRequest.method = URLRequestMethod.POST;
    newRequest.data = vars;
    submitLoader.load(newRequest);
    if(completeFunc != null) submitLoader.addEventListener(DataBridgeEvent.LOADED, completeFunc);
    else submitLoader.addEventListener(DataBridgeEvent.LOADED, DataBridge.parseXML);
    submitLoader.addEventListener(DataBridgeEvent.ERROR, errorHandler);

    Please let me know as soon as you can. I’m in big trouble I think. Thanks.

  12. I don’t think size is such an issue. Users will download a 70 mb browser to view html 5 but struggle to download a 3 mb flash player. It is all about perception. If you are asking users to download the app and then download air you have a barrier to entry. This barrier is removed with captive runtime. Users have no problem streaming a 40 mb video off youtube, but they dare wait 20 seconds for a flash site to load 2 mb or 3mb! Again it’s all about perception and context. If I have a Samsung Galaxy S or an iphone I don’t think I will care about 8mb or even 20 mb over the air. And I don’t think the space requirement will bother me at all.

  13. Hey Lee,
    Could you explain how this feature works with extended desktop? I see it creates an air file without a native installer, but would I still be able to use the nativeapplication classes? I cant even package an air app with 3.0 using extended desktop as an option anymore.

  14. Captive runtime packaging is really great, despite the extra space it requires.

    However, I’m having an issue actually running the apk once it’s been packaged… The app opens, then closes right away. Any thoughts on why that might be the case?

  15. The additional MB is not an issue for desktop apps, especially if I can get apps on Mac AppStore now. I hope that this is possible ?

  16. Do you know if there are plans to implement captive runtime in RoboHelp AIRHelp? Would this eliminate the need for AIRHelp users to install AIR and also to install the AIRHelp updates? Thanks!

  17. I loved the captive runtime feature. It helped me running the flash based game on iPhone and android devices very well, which were not really coming well on iPhone with earlier version of AIR.

  18. Hi,
    I’m having a lot of problems using Captive Runtime on the following scenario : Captive Runtime + HTMLLoader + user with no privileges (usual scenarion for school computers).
    Thanks,
    Razvan

  19. Great thing to have allowed sort of a projector bundling for air apps.
    But why isn’t it as simple as on flash to target both mac and pc ?
    Why do we have many files into a folder on windows version instead of one clean file ? There should be a compiler instruction to compact every dll as a ressource inside the main exe no ? Plus a possibility to add a custom Icon and not the AIR icon. It would be really nice to have such a packaging because otherwise for the desktop mdm Zinc would fit way better even if its another licence to pay for.

  20. Awesome post! Exactly what I was looking for. I’ve just started developing for Android and deployed my first app to my Android tablet yesterday. I was surprised to discover that I needed to download AIR first and was wondering if there was a way around it. Now I know there is. Cool!

  21. Has anyone tried testing an android app with captive runtime on an emulator?
    I am able to package it and install it, but when it is launched in the emulator, it gives the ‘force close’ message?
    The earlier versions without captive run time work fine on the emulator