in AIR

Great AIR for Android Example – Easy and Speedy

We have only had the AIR for Android private beta open for a couple of days but already developers are rapidly creating cool games and applications. Jobe Makar, the lead developer at Electrotank, has posted his thoughts on the ease and speed of development as compared to his experiences with the often-painful Apple processes. He has posted a couple of videos of a game that he was able to port to Android in a few hours, and that “includes downloading and installing the SDKs, walking through a Hello World tutorial, charging the device for a little while, and making some minor code edits”, said Makar.

Expect more and more testimonials like this as the beta gets out to all developers. We are able to get tremendous performance on Android devices because Google and the various handset manufacturers have chosen to work closely with us to provide the best possible experience to the end user. Go Android!


Write a Comment



  1. I am also shocked how easy it is to get great performance right out of the gate without rigorous optimization like I experienced with the iphone. It makes prototyping much faster & flexible.

  2. Pure awesomeness. Can’t wait to see the incredible apps and games that developers start porting to android mobile devices.

    There should probably be a site to showcase all the BA flash apps that are going to surface in the weeks to come. Maybe a spin-off of FWA?

  3. I think the ‘Android’ part in in the ‘Go Android’ should have been bold too , in keeping with the in-between-the-lines-jabs :P
    This looks superb btw , Go “Android” Indeed !

  4. I must admit this is a decent example in so many ways. 1) It touched on how responsive the finger is , obviously this is small fruit so t’s nice to know that it is precise 2) The animation is good , this shows a nice frame rate 3) also the integration of multiple audio files being able to play with the animation without slowing the game or the user experience. Interesting……

  5. Ok to anyway having the same question of

    “Will there be a packager for Android as it was for iMagical?”

    Apparently yes there will be. So swf files will be converted to apk files which can then be deployed on device without any fuss.

    Android FTW basically

  6. Hey

    Just wondering what people think of the NexusOne? Am 18 months into my iPhone contract which means I am now out of the lock in period – I love the iPhone but am ditching it because i have found that after a year and a half, the lack of flash is a genuinely preventing me from using half the sites I need to (some Flex interfaces, bbc news videos, and especially local restaurant sites – which all appear to be built in flash!). I am about to start researching alternatives, is the Nexus one the obvious choice?


  7. Nice article Lee. I’ve got to say that I’m really excited about developing for Android. Taking Flash onto new platforms is something that I’d love to get into.

    The only thing that holds me back is the roll-out of the phones and the general popularity at the moment in the UK. If you ask Mr Average Joe what they think of Android phones they would look at you as if to say “what the hell are you talking about?”…”is that an iphone?”. The man-on-the-street generally hasn’t even heard of the Nexus One, which is a bit annoying to say the least. But it’s a name that usually only comes out in geek conversations after they’ve discussed how much they hate the iPhone.

    So as much as I’d like to develop for Android…I’m a bit hesitant to learn the skill when I’m not 100% convinced that the public are going to go with the technology. Is that cynical?

  8. Hi Lee,

    I have some simple questions:

    Will Flash Player 10.1 and the “android packager” be available with the release of CS5?

    Will we be able to develop for android without Using CS5? I mean, for example, only with the free flex SDK… As I understood, regarding the iPhone packager, in order to deploy to the iPhone you will need CS5. Are we in the same case when developing flash based apps for android?


  9. Awesome! I will be switching from iPhone to Android this summer. Has anyone else noticed the specs on the HTC Evo? Amazing device!

    I can’t wait to get going on development. I built my first AIR application a couple months ago. So I guess I better get reading on optimizing applications for mobile!?

    Thanks Lee! You are always an immeasurable resource to the entire development community. Keep it up!

  10. Excellent stuff, makes me want to try an Android. The more examples we see of Flash applications on various mobile platforms the more *that other* device is going to seem like it is missing an important piece of functionality. And then the marketplace will decide….

  11. I’ll just quote Lee from one of his previous posts:

    “Screw you Apple!”

    This looks awesome and well done to everyone involved!

  12. Android is the way to go, this is great. I’ve been playing with Android SDK for eclipse in the meantime and even that is way easier to learn than the whole iPhone process. Go Android, indeed. Waitin for the EVO, then I’m switchin.

  13. Is the graphics rendering in OpenGL or is it the Android equivalent of Quartz? i.e. is it using the cpu or the gpu? (I don’t actually know if the nexus has a gpu, but I assume it does.)

  14. This is why Android will continue to build market strength until it overtakes Apple and even RIM.

    The openness of the operating system has allowed it to go from an interesting idea in 2007 to being a major player in the marketplace in 2009.

    I just wish other companies in the tech industry would learn from this.

    My prediction is that 2010 will be the year of Android!

  15. Hi lee,

    I had the exact same questions as Martin & Erik.
    – is it included in cs5?
    – camera & microphone support?


  16. Cool! Thanks for sharing. How soon can we get a tutorial on this process? When can we get a packager out of CS5? This should have really been at the forefront, not the stupid compiler for the iPhone. Personally, I do not understand everyone’s fascination with that device or the iPad for that matter, I would never have one. Steve Jobs is not God, nor is Apple. They are just marketing geniuses with a nice sense of style. I mean real geniuses, they succesffuly convince so many people it is OK to have overprice products that can not display all of the content from 80% of the sites on the internet. Woah, advertising works! Poor little blind iSheep. Oh well, enough ranting, back to more promising platforms. So where’s our tutorial? :-)

  17. Forgive my ignorance on this subject…I have less than zero knowledge of HTML5/Canvas. That stated, a question:

    Is it possible to replicate the functionality of Flash Player using some combination of HTML5/JavaScript?

    It seems that if Adobe could figure that out…the Flash/Apple conflict could be somewhat resolved.

    I honestly mean to be solution-oriented…no trolling intended :-)

  18. The W3C hasn’t even decided fully on the specs for HTML 5. That process is likely to take somewhere between tomorrow and the next ice age. Until HTML5 can fully support SVG, Flash will live. Also, it will be tough to replace the functionality of Silverlight because of its tight integration with the .Net framework. I’m not advocating either of those solutions OVER anything else, I’m just pointing out that HTML5 isn’t the end-all be-all solution.

  19. Will the Android flash port have hardware accelerated video? I know the desktop Linux version of flash was lacking it, and I was a bit curious how the Linux-based mobile operating systems, such as Android and WebOS, were doing on that front.

  20. The game is nice by itself,
    -show a textured 3d realtime 3d game with some shader magic going on before touting wicked performance, not a 2D puzzle game
    -show that one can at least 2D games like this running at nice performance even when coded in AS1 or 2 and when using movieclips for the whole graphical side.
    You probably can´t, because its not possible at all with flash.
    Come on Adobe, you can do it, stop playing kid fights with Apple.
    You won´t convince anyone besides your already convinced fanbase without bringing competitive performance for all types of content.
    Bring on propper full on hardware acceleration for all graphics side things, also do propper backwards compatibility by also still allowing using AS1 and 2 no matter to what one deploys.

  21. @Mike sorry but AIR requires you to develop in ActionScript 3.0. Also Flash is not meant for doing heavy 3D games, although some have tried. For that you should look at excellent technologies like Unity3D.

  22. Lee, very cool We have to continuing pushing Air into Android, forget about Iphone, Adobe must be clue a put more fast the version.



  23. @Mike no I wouldn’t want AS1 and AS2 programmers ruin the reputation of flash games by creating large, CPU enemy flash apps using some sequential 5000 line AS2 code.

    I am already angry at Adobe for Flash Catalyst as it goes against everything about a good, structured and optimised application. Flash is not a cpu killer, badly written applications are, and I would not want that to come into smart phone environment.

  24. I appreciate you even adding my reply, i wanted you to read it but i hadn´t expected you would even publish it, that´s nice, thanks.
    But yeah, why? :)
    I mean i don´t understand why Adobe has totally dropped the support for AS1 and 2 for any new api additions and also hasn´t included it for air and other newer platforms support while its clear that a big (probably majority) part of the designer base heavily prefers AS1 and 2 type syntax and workflow over AS3 which never became as popular among such people, nor is it likely it ever will, its just more fitting for more java type oo thinking developers.
    Next up, yes its nice you mention unity and we also use that for anything flash´s performance is not good enough for, but again, why is that with flash? I mean why doesn´t Adobe finally get into full on hardware acceleration for all graphics side things?
    I understood the hesitation for a long while for desktop machines with largely varying hardware, but at least when going device specific with Android or iPhone support where you know the device specifics you could do it now instead of still letting most be done by the cpu. Well, i hope Adobe changes its mind on these things because not doing so makes it less and less enjoyable and useful for me and i imagine many others.

  25. @Mike

    Can you name even one “3d realtime game with some shader magic” on a touch-based platform that’s worth playing? I can’t …

    I don’t need eve online on my phone. When I want deep complexity, I play PC games. I want a game I can play in 5 minutes at a bus stop. I want apps that will maybe poll the bus station to find out when the bus is coming. No need for 3d there.

    Also, I maybe want to play day of the tentacle.

    I want “Upgrade Complete” from armor games on my phone.

  26. Frederico, idon´t need to name a specific game, there are of course many which you can look up on the app store.
    My point was also not “2D bad 3d wohoo”, that would be nonsense of course. Full on use of the graphic hardware for all graphic operations would help for 2d games just as it does for 3d stuff though. Flash´s main performance weakness, which makes it a total nogo on some platforms and a ressource hog regarding cpu usage even on highend machines is that most of the graphic side things are done via the cpu. It was my point that its about time that gets properly addressed.

  27. Federico: I can name lots of 3d games on touch-based platforms that are worth playing. 3d doesn’t mean it has to have deep complexity. There’s lots of fun racing games and arcade style action games that are 3d.

    Mike: AS1 and AS2 are slower and harder to debug than AS3 for one thing. And why should Adobe continue to support outdated languages anyway? Designers may like it, but designers are not programmers and they more often seem to code themselves into trouble. AS3 is not any more difficult, just a bit more verbose. If you were following best practices in AS2 then the transition to AS3 is a piece of cake.

  28. to Dave: Yes, I know about the downsides of AS1 and 2 fairly well and you definately got a point there. On the other side AS3 and the VM coming with it have their fair share of issues, too of which many were never addressed and some maybe never will be as they are faults inherent to the concept.
    I find the garbage collector of the newer VM a disaster which also shows clearly enough on many flash content running sites which have heavy memory leakage issues.
    We should be over the times when one had to manually do everything “needed” (which was done automatically 10 years ago) to go sure memory is freed when it should be.
    Next up The displaylist api and setup that came with AS3 is great as it allows things that weren´t possible in AS1/2 like reparenting display objects, on the other side AS3 and the VM setup that came with it make it way, way more cumbersome to do any kind of timeline based nested movieclip animation control, runtime loading and unloading of swfs and many other things, all way more error and memory leakage prone and overall way more time and planning taking than they should.
    Regarding whether a higher level language is more outdated than a lower level one (even if the lower level one was introduced later than the higher level one in the flash world) is highly debatable, in either case it clearly shows that its not preferred by a big chunk of the classic flash content creator base, so dunno if its a wise move to see it as outdated, deprecated or at best backwards compatibility mode supported as Adobe does.
    I can and do code in other OO based languages quite regularly, but i still dislike AS3 for overcomplicating things that were clearly way less convoluted, quicker and less error prone to do in AS1/2 in many cases, all that time wasted is something we often don´t have or don´t want to waste on that end of a project where often enough projects have ultra tight deadlines by themselves already without loosing any additional time on such things.
    If i had to describe AS3 in one word it would be: overcomplification.
    Next to that i really have no interest in using a language i heavily dislike and see as costing way more time on every project “just” to gain performance while i know that if Adobe would finally properly address the graphics side performance issues the gain or loss of the codeside performance difference between AS3 and 1 stuff would be negligable.
    I personally only use AS3 and also the newer IDE versions when a project absolutely needs it which is in most cases due to newer api features not being ported to AS1/2, never for performance gain reasons (cause if flash´s performance is not enough i just use a different technology instead).
    So that then also automatically makes the newer IDE versions way less useful to me, they need way more memory and have all sorts of other issues, so with newer api features not supported in AS1/2 and me not using AS3 when i don´t have to, well, i still prefer flash cs3 ide. I know i´m by far not the only one and all this summed up is a brief but i think good overview for why flash ide sales are going as they are compared to a few versions ago.

    It really takes no genius (cause i am none =) ) to predict that if Adobe wants to have the best selling flash version ever they should:
    -Add all newer api features to AS1/2 and also all platform deploy options as far as possible
    -Allow using several languages together, improve compiler and interpreter to be able to communicate between languages seamlessly and get same higher than now performance no matter in which language one codes
    -Add full on hardware support for all graphics side things to have a massive performance boost
    -Add option to create content for html5 canvas rendering without plugin

    And it also takes no genius to predict that the less of these points Adobe implements within the next flash version release, the bigger is the chunk of designer oriented people they loose, next to a bigger getting group doing more and more of what´s possible in other plugin technologies or in html5 way.

  29. @Mike

    And they keep saying Flash is too damn slow.
    It’s just that people don’t move on. Come on, why do we need to write Flash with outdated and slow language like that?

    People hate slow Flash, then why should we put the thing they hate there?

  30. Big deal on this demo. Of course its going to look good and perform well in a test environment, but get these flash pieces out to the public for playing, and your watch battery life and performance drop fast.

  31. @FootGay:
    As i said before, the main performance bottleneck of flash is the graphic side.
    Once that would be propperly addressed the performance difference between using AS1 and 3 would be negligable. See unity and other technologies where one can code in javascript and the performance makes flash look really old.
    Next to that when using AS3 one deploys for running in the new VM which as i said is in my opinion serious issues with its very memory leakage prone garbage collector setup which often then leads to way more problematic performance and stability issues.
    Before that thing existed the worst thing happening with flash content was usually a script timeout warning, it would hardly ever crash or freeze the browser.
    Meanwhile i experience that very regularly with flash content, next to even not crashing content taking up way too much memory.

    @Sam: Yes, that´s what i was complaining about the way flash runs right now is that it maxes out cpu usage way too much for in comparison to what´s done at same ressource usage with other technologies very basic content.
    Imho there´s really no way around using the gpu for all its worth for and not just plotting an image previously created by the cpu.

  32. @Mike
    Flash 10.1 and AIR for mobile is (as far as i know) fully gpu accelerated (filters, bitmaps, vector, video, audio, text). Also the memory usage has dropped. Does this ease your mind?

  33. no it does not because it isn´t true.
    Sorry for being that blunt.
    If you see it as full propper use of the gpu than we have a different understanding of the term. We can probably discuss this better once CS5 is in the wild and all know better which parts are hardware accelerated in which way and how that then performs at the end compared to other technologies.

  34. Does anyone have any word on if Air supports Bluetooth connections? It would be very cool to have an App that communicates between phones in close proximity.

  35. Mike:

    This isn’t the best place to discuss this topic, but in short you’re wrong :) The garbage collector in AS3 is more efficient than the one in AS2, and any memory leaks are the fault of the developer not properly cleaning up after themselves; this was necessary in AS2 as well. I don’t know what problems you have with loading a swf at runtime, it’s pretty simple. I completely disagree about AS3 being overly complicated. When I first made the switch I would have agreed, but once I stopped approaching things the AS2 way and embraced AS3 I found it to be more consistent, easier to manage, and easier to debug.

    As for the gpu use, I would love to see as much as possible move to the gpu on desktop and mobile versions of the player. This hasn’t been done in the past for several reasons, but I think it mainly comes down to getting Flash to run everywhere and look the same everywhere. If you use the gpu there will be differences in the way things are rendered, and many computers out there do not have a gpu that are capable of the task. I’d rather they have gpu rendering as an option with software as a fallback, hopefully we’ll see this in future versions of the player.

  36. having full on gpu rendering just as option is not really a propper option because then it would not happen quickly enough and full on for all graphical operations at all, as can be seen by how things are going over the last 10 years on that end.
    Adobe in the more recent version also tends to add in different gpu etc modes by the manner: the content creator can test and see what runs better or not, which often means it does not run propperly at all for the majority, that´s why its not the default mode or not enabed by default.
    Regarding AS3: Well, that´s how you feel about it, doesn´t make my statements less valid =)
    In which way is the garbage collector of AS3 more eficient? The only drawback i saw in the VM 1 GC was a circular reference issue, but that is negligable compared to the amount of flash content i see nowadays running inVM2 that crashes or freeses the browser thanks to memory leakage issues.
    And that also explains why i think its the wrong view to say: \Memory leakage is the fault of the developer not propperly cleaning up after themselves\
    First: for the content consumer it doesn´t matter who caused it, its flash´s fault for them when flash leads to crashes.
    Next up for the developer, there may be many like you who see it as fault of the developer, but there surely are also many like me who see it as big step backwards that something i tell to get deleted or nulled still is in memory if i haven´t done all the steps that are now needed for that which were not needed before.
    This will haunt Adobe and have a negative impact on the flash plugin´s stability and ressource usage reputation forever until Adobe changes the GC cleanup handling to something that is more automated and reliable as it was with VM1.
    Regarding loading swfs: sure i can load a single swf or even several with AS3, too, but its way more cumbersome, takes way more lines and is way more prone to causing big memory leaks when unloading them. Its a great example for all many moan about with AS3.
    I know many have your stance, but there´s just no arguing about it, a huge chunk of the group which made flash big in first place with creative content thinks its way ore cumbersome and way less fun to do similar things in AS3, next to it taking more time to do and this will never change because not all designers will ever like thinking and coding in more java like stricter oo workflow.

  37. The reason gpu needs to be an option is because Flash needs to work on computers that don’t have an advanced enough gpu. Even many modern computers still come with crappy onboard video cards that are useless for offloading rendering to the gpu; there are also many older computers out there that also don’t have a capable gpu. You may be ok with people not being able to see your content, but Adobe and many of their customers are not.

    As for the garbage collection, it’s almost the same as the Flash 8 garbage collector, it just deallocates the memory in a more efficient manner. And, just like with AS2, you have to dereference everything if the garbage collector is going to free up the memory. I think the biggest problem is with AS3’s events, a lot of people don’t remove all the event listeners and that leaves things hanging around in memory. I’ve seen this a lot with AS2 programmers moving to AS3, they leave event listeners hanging around, or they think they’ve removed them when they haven’t. It’s ridiculous to blame that on Adobe.

    I spent a couple hours writing an event management class that does two things I think should have been built in: You can’t have multiple identical event listeners on an object (a lot of noobs do this by accident) and there is a method for removing all event listeners for the specified object. It’s no guarantee to prevent memory leaks, there are other things I see people doing when they know just enough about OOP to be dangerous, like passing references all over the place that never get cleared up. But, at least in my experience, event listeners are the #1 culprit and my event manager class deals with it pretty well.

    I think you’re blowing this way out of proportion though. You act as though anything done in AS3 is a memory leaking monster that constantly crashes, and that just isn’t true. I don’t see AS3 content crashing any more than AS2 content. Don’t blame Adobe for your own incompetence. If you want to use the cool new features then learn how to code AS3 properly. If you don’t want to use AS3 then enjoy your copy of Flash 8 and don’t waste your money buying an upgrade.

  38. I’m going to play devil’s advocate here. Performance is great here, but how do we know it’s not taking up as much CPU time and battery life as a higher end 3D game? I don’t want a simple 2D game to drain my battery.

  39. @lee

    Sorry, how can you call that “tremendous performances”?

    The very simple game you are showing on this video is lagging like hell!!!
    If you call that “tremendous performances”, then I can only conclude that Adobe’s standards in performances are very very very low, or that you have an issue with your eyes…

    For my own performances standards, which are pretty high I confess, these are AWFUL performances.

  40. Looks like fun. Does anyone know if we will be able to access gps, camera and microphone interfaces in Air? Will there be some built in classes like the one for touch gestures?