Here is a simple Employee Directory application I wrote to demonstrate how to build Flex applications for Android using the AIR runtime.
Watch the video:
The key point when you look at the source code of this application is that you build Flex applications for Android the exact same way you build Flex applications for the Browser and the Desktop: same programming model, same language, same tools, same code. This application for example uses a local SQLite database on your device that you access using the same database API you’d use for any other Flex application running on the AIR runtime.
The other good news is that you have access to additional APIs (GPS, accelerometer), and you can integrate with other applications on your phone (dialer, SMS, email, etc).

Tried it on Motorola Milestone (Droid) running Eclair.
It works fine, thank you for sharing. Anyway the “ListView” suffers of slow scrolling. I think it’s due to the lack of hardware acceleration on this Air Prerelease.
Wow.. Thank you very much for sharing this code.
Really interesting and encouraging … ;)
Keen to surf more on this series..
It’s so exciting to integrate Air/Flex app with Android. I am starting to code with your sample immediatelly. Thanks for sharing again…
Very good. One of the best articles about this theme I ever read.
Hi, Christophe. Thank you very much for your shaing!
I have some question about the source code:
1. On the instruction “Developing Adobe AIR Applications for Android” (by Adobe), page 12, it is said that the “Main application file” should be .as file rather than .mxml. However I notice that in your source code the main application file is a .mxml file(“EmployeeDirectory.mxml”). This make me confused?
2. How can I package your application in the EmployeeDirectory.fxp file(under /bin-debug) to a .apk file? or should I convert the application to another format such as .air first?
I am in China, so I cannot watch your video on youtube, in which maybe the questions have been answered.
Looking for your reply!
Thank you!
Christophe,
Thank you very much for sharing this.
1) Installed fxp in flash builder, compiled and installed on HTC Desire(Eclaire). Error view. Is there a way to find the error code?
2) Confused because I undertood only as3 was supported for the moment.
3) Going to try your apk file.
4) @sher: Import the fxp-file into flash builder. Then follow the instructions in the adobe pdf.
Installing your apk gives Errorview too on HTC desire with Eclaire. Where can I find the error codes?
Its very good to hear that Android 2.2 now supports Flex 4. I have a querry , I would further request you to clarify me. I have developed a Flex application on windows a couple of months ago( Windows XP , Flex 3) Currently my client wants the same application on Android, Can it possible. let me know in case you need any details on my end.
Let me also know the License part of Android.
I have a flex application running on Firefox and want it to run in Android browsers,is it directly portable to Android browser or need to do any scaling or skinning for compatible?
Very very cool. Have been looking forward to building on Android using as3. The time has come, LET THE GAMES BEGIN! :-)
hai,
i tried running this application in emulator but i am getting the following error, i had got the info from the dalvik debug monitor.
Log:
06-07 15:15:14.492: WARN/InputManagerService(51): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43bcf3d8
Please help me in resolving this i am unable to run any app in the android emulator.
Very very cool.
welcome to my site:http://www.bagicon.com
Thank you!
hi,
your application crashs on emulator with AIR 2.5
Source not working…
Hi,
Very cool app…..
However, liked fisher asked, how is that you are using .mxml while the PDF on the AIR prerelease says that, .as must be used.
Your help is very much appreciated
Ram
I worked alot tryiing to run this app on android emulator but its useless, if any one had suceeded int his process please let me know.
i even rebuilt the app but no using flash builder with source code but no use..
thanks,
Shyam.S
Hello Respected Sir,
i open this application ‘Employee Directory.fxp’ in Flash Builder and sdk i use Air 2.5 for this project, But it show an error every time.
Please tell me the solution.
Thanks
Main app doesn’t have to be AS file, if you are using Flex 3, not working with Flash Builder 4 yet.
I was writing my game in Flex 3, SDK 3.1 with AIR 2.5
my UI is wrote in MXML, all controllers are in AS3.
works fine in 2.2 emulator.
http://www.flexcode.org/flex/sudoku.apk
This is cool…i didnot know that flex would work on Android phones (as i thought its heavy) but it works great…..
Hi Christophe
Yesterday (30 June) has been released the flex sdk update that updates the flex from version 4.o to 4.1 which adds AIR 2 and Flash Player 10.1 support to flex
Does this version of the Flex SDK support the mobile (particulary Android 2.2) development?
Or we need continue to use the AIR SDK 2.5 from https://prerelease.adobe.com in order to develop mobile applications?
What about the next version of the flex sdk “Hero”? Will it incorporate AIR SDK 2.5 for mobile development?
Regards
Geo
Hi Christophe,
Maybe you can clarify something for me. We use Flash Builder 4 for our web and desktop apps. I noticed in your application, you use both ActionScript and MXML files. In reviewing the recommendations on the Air for Andriod pre-release site, they are suggesting that applications should only include ActionScript since Flex is not optimized for mobile devices. Obviously, you’ve proven that it works, so is their warning simply a suggestion or is there a technical reason why MXML should not be used?
Obviously, Adobe is addressing the mobile market with Hero, but that is a near-future solution. Can you provide some insights into what is possible now with MXML so that we can leverage re-use of existing components for our Android apps? Is there a different recommendation when considering a Flash vs. Air app on Android? We’re at the beginning of a new development cycle, so we can make these decisions fresh and not have any old baggage. But we need to have some demonstrable Android solutions over the next couple of months.
Thanks for your insights.
Tom
i’m not much of a developer, but I would love to have this application on my Epic
i’m not much of a developer, but I would love to have this application on my Epic, but I have no clue as to what I would need to do here. After downloading it to my phone, I received a “Force stop” error. Some help would be great!
Great example! I liked the “The Office”s cast :)
Hi everybody?
I cant download the source code (EmployyeDirectory.fxp)
Can anybody send me this file?
I thank you in advance
jservingo@gmail.com
Hi ,
I am Sanjay, am new in mobile application.
I have made one Mobile Android application using flex buritto. I want to deploy this application in my device.
can you please help me for the same.
Thanks
Sanjay
Hi,
I was try to run this application but it was give an error
Thanks for the video. I am a beginner at this, I created an application for the Android, but I can’t find the right codes to put so it will have an Exit application option. I like your app.
Hi Friends….
I dont think so “Christophe Coenraets” is interested in giving answers to your post….
Can any one can tell me how to get the profile picture,,,I have tried a lot to get the image of the employee…I need help…
Weight loss plans should always support healthful behaviors that help you lose weight and that you can stick with.
hi. ı download the apk and its working on the pda and phone with air 2.5. I download fxp file and import in flex then export apk again. but its not working. Also all of the file whics s export from my flex dont working too. please help me from blueromans@hotmail.com. Thank u very much.
Thanks for the new things you have disclosed in your blog post. One thing I would like to discuss is that FSBO connections are built as time passes. By presenting yourself to the owners the first saturday their FSBO is actually announced, prior to masses begin calling on Mon, you build a good network. By mailing them resources, educational components, free accounts, and forms, you become a good ally. By subtracting a personal desire for them and also their predicament, you produce a solid link that, on most occasions, pays off if the owners decide to go with a representative they know and trust — preferably you.
Thank you very much that you share your code. I try to develop air / android from flash builder your source code very usefull to me.
anyone know about the gps source code in android via using flash builder?
447587646@qq.com
thanks advanced
Sitios web.0 and additionally “Cloud” processing is definitely not different a particular launch associated with Discuss Power Colonel David Boyd’s hypotheses (Boyd’s Never-ending loop, or use the OODA Picture), because created by the united states Service, whereby people who undertake the particular cycle more quickly plus much more properly tend to be more responsive to community stresses, and definately will win all the battle with the hearts and minds and also mind in their target demographic.