This is intended as a beginner How To guide to create an Android application with Adobe AIR platform. The resulting application is akin of a Hello World application that doesn’t do much. Frankly the basic of writing an Android AIR app is quite straightforward and there’s not much to mention here beyond the basic. Consider this as a light tour… hope you enjoy it.
To build an Android AIR application, you need to use Flash CS5.5 or newer. Flash CS5 does not have this feature (previously it was available as extension for CS5, but that extension seems no longer being offered). You can also use Flash Builder but this article is strictly using Flash IDE.
To create the sample app, follow this:
- Start up Flash, select AIR for Android under Create New project.
- Create the movie, add animations and code in the Flash environment. For this example, I am just adding two bouncing balls, some text, and a clickable html text field.
- When you are ready to test, you can use the Debug or Run command, which will run in the Android simulator. If you have a device connected, the on Device via USB option will be enabled.
- When you are ready to publish, go to File->Air For Android Settings to set-up some Android specific settings, such as icons and permissions. In the General tab, you can specify output filename, version number, orientation.
- In the Deployment tab, you need to create a Certificate, which is required in Android Market. Unlike creating an iPhone certificate, the process for Android is very straightforward and all can be done in the Flash IDE.
- The first time around, you need to create a certificate, by clicking Create. Then fill out the form below to create the certificate.
- The Icons tab lets you upload icons for your app.
If you do not provide one, the default Android App icon will be used.
For more about publishing, see: http://help.adobe.com/en_US/flash/cs/using/WSb03e830bd6f770ee317e94381294c702634-8000.html#WSb03e830bd6f770ee317e94381294c702634-7ffd
A side note is to point out that you can switch the same project to publish for iOS (iPhone/iPad) from File->Publish Settings menu.
Note that an Android app created with AIR platform requires the AIR Runtime on the user’s phone. The Runtime is a Free download, but if the user does not have it (or have an outdated version), they will be promped to install it the first time the user runs your app. This could be a potential drawback as your app may require an extra step to run the first time and average users might be reluctant to install another software.
If the user chooses Install,, then they will get this:
Download the example FLA.