Last night, I downloaded the new BlackBerry Playbook SDK and thought it would be fun to try to run the Employee Directory application I had just blogged earlier in the day (as an Android tutorial) in the PlayBook Emulator. It turned out to be amazingly simple. I was able to run the application without changing a line of code, with a great and consistent deployment experience: You select the target platform, hit the run button, and the app is packaged, deployed, and started on the device you selected.
Deploying a Flex Application to the BlackBerry PlayBook (and Android Devices)
Tutorial: Flex for Android in 90 Minutes
If you are looking for a quick way to get started building Flex applications for Android (even if you don’t have an Android device), check out this tutorial: FlexAndroid90Minutes.pdf.
You can download the supporting materials here: FlexAndroid90Minutes.zip.
This tutorial will be posted as a DevNet article in a couple of weeks, but I already wanted to make it available here because a number of people have asked for it. It is based on the hands-on session I delivered at MAX, with additional information and instructions.
Here is a quick outline:
- Part 1: Creating a Basic Mobile Application
- Part 2: Using Mobile Item Renderers
- Part 3: Navigating and Passing Information between Views
- Part 4: Creating an Action Bar
- Part 5: Integrating with the Device Capabilities (Dialer, SMS, Email)
- Part 6: Using a RemoteObject
- Part 7: Using a Local SQLite Database
In this tutorial, you build a fully functioning Employee Directory application. The end result is the application available on the Android Market. (Just search “Employee Directory” in the Android Market).


As always I appreciate your feedback to continue to improve the tutorial.
Thank You,
Christophe
New Mobile Trader Desktop Demo App for Android
I built a new “Mobile Trader Desktop” application that I published on the Android Market. This is a demo application (with simulated data) built with Flex “Hero” and running on AIR for Android.
To install the application, just search for “Mobile Trader” on the Android Market, or access the following URL from your device’s browser: market://search?q=pname:air.MobileTrader.
You can download the source code (project file) here. You need Flash Builder Burrito (available here) to open this project.
Quick Application Walkthrough
The “Assets” tab shows a summary of your investment portfolio’s progress. You can use swipe and zoom gestures on the chart at the bottom of the screen to navigate through historical data. Notice that if you rotate your device (in landscape), the layout changes to display a full screen view of the chart. The charts in this application are built using simple FXG paths (not mx charts).
My Employee Directory Application Published on the Android Market
I just published my AIR-for-Android Employee Directory application to the Android Market. If you have an Android device you can find it by searching “Employee Directory” from within the Market application.
This is a new version of the application. One of the new features in this version is that it allows you to easily import your own data (click the Menu button on your device to access the “Import Data” screen).
You can find more information on the application companion page: http://coenraets.org/directory.
Building Lightweight, Mobile-Ready Charts with FXG
Using system resources effectively is always on developers minds, particularly when building mobile applications. In “Hero”, many components will be optimized for mobile devices. Traditional full-featured charting components, however, may still be heavy on a mobile phone. The good news is that in addition to the MX charting components, Flex also makes it easy to create custom and lightweight components for specific use cases.
As an example, here are four very simple charts built with just a few lines of FXG. They are by no means complete components: just a starting point to show one way of doing simple charts on mobile devices.
Real Time Trader Desktop for Android Updated
I updated my Real Time Trader Desktop for Android sample application to work with the latest AIR for Android build (8/26/2010). To make it easier to find the latest version of the application, I also created a project page for the application where you will always be able to download the lastest build. That way you won’t have to skim through blog posts to make sure you found the latest one.
Both the apk file and the source code are available for download on the project page.
Employee Directory for "AIR for Android" Updated
I updated my Employee Directory on AIR for Android sample application to work with the latest AIR for Android build (8/26/2010). To make it easier to find the latest version of the application, I also created a project page for the application where you will always be able to download the lastest build. That way you won’t have to skim through blog posts to make sure you found the latest one.
Both the apk file and the source code are available for download on the project page.
Multi-User Google Maps Collaboration on Android
This application allows users in different locations to work together in Google Maps.
The collaboration features in this application include:
- Video Chat
- Map Synchronization on move, zoom, etc.
- Whiteboarding
- Cursor sharing
When running on Android, the application can use the device’s GPS to share your location.
This is just another example of “built-in” collaboration (go here and here for more). The point is really how easy it is to add these collaboration features to any application, and then to deploy these collaboration-enabled applications to multiple screens (browser, desktop, Android, and more devices soon).
Experience the application in the browser
Click here to experience the browser version of the application.
The application is written in Flex 4. The collaboration features are powered by LiveCycle Collaboration Service.
Multi-User Video Tic-Tac-Toe for Android
My previous post, “Video Chat for Android in 30 Lines of Code”, has generated a good level of interest. A slight twist on the same idea is to build collaboration into your applications. The use case here is slightly different: instead of enabling simple “video conversations” between remote users, this level of collaboration enables remote users to work together (or play together) within an application on their mobile device (or traditional computer).
To demonstrate this idea, I wrote a series of Flex applications with collaboration “built-in”. The same application can be deployed as an Android app, as a desktop app, or in the browser.
The first application in this series is a simple Tic-Tac-Toe game. The collaboration features built in this application are:
- Videochat
- Shared cursors: follow the other player’s mouse position
- Real time messages: a player’s move is immediately sent to the other player
- Shared states: whose turn is it to play etc.
These features are enabled by LiveCycle Collaboration Service.
Watch the video of the Android version:
Play Now!
Click here to play (with the Browser version). This is obviously a simple application, but the same concepts can easily be applied to sophisticated social or business apps. My 6 year-old loves it, especially when I’m on the road

Download the source code:
Click here to download the source code.
Video Chat for Android in 30 Lines of Code
Here is a simple Video Chat application I built with Flex 4 and deployed on AIR for Android. The Application is just 30 lines of code and allows multiple users to join a chat room and “video chat”.
Video streaming is powered by LiveCycle Collaboration Services, a set of hosted Flash Services that enable developers to easily add real-time collaboration and social capabilities to their applications.
This application is obviously a bare-bones proof of concept. However, it is fully operational, and the same code can run on different runtime environments: AIR for Android, AIR on the Desktop, and Flash Player in the Browser. Users can participate in the same collaboration session regardless of the runtime environment they use.
Watch the video:
The 30 lines of code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:cs="AfcsNameSpace" currentState="logon" fontSize="28">
<fx:Script>
[Bindable] private var roomURL:String = "http://connectnow.acrobat.com/YOUR_ROOM_NAME";
protected function connect():void {
auth.userName = userName.text;
currentState = "default";
session.login();
}
</fx:Script>
<s:states>
<s:State name="default"/>
<s:State name="logon"/>
</s:states>
<fx:Declarations>
<cs:AdobeHSAuthenticator id="auth"/>
</fx:Declarations>
<s:TextInput id="userName" includeIn="logon" top="200" horizontalCenter="0"/>
<s:Button label="Connect" click="connect()" includeIn="logon" top="250" horizontalCenter="0" height="50" width="150"/>
<cs:ConnectSessionContainer id="session" roomURL="{roomURL}" authenticator="{auth}" autoLogin="false" width="100%" height="100%" includeIn="default">
<cs:WebCamera top="10" left="10" bottom="10" right="10"/>
</cs:ConnectSessionContainer>
</s:Application>

RSS