Sample Application using Flex and AIR for Android

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).

Download the Application and Source Code

  • You can download the application (EmployeeDirectory.apk) here
  • You can download the source code (EmployeeDirectory.fxp project file) here

Android Trader Application with Flex 4 and AIR

I recently blogged about building a Real Time Trader Desktop Application using Flex 4 and LiveCycle Data Services. I posted the source code for the AIR version and the Browser version of the application. The next logical step was to build a Mobile version. I used Flex 4 and the prerelease version of AIR for Android.

Watch the video:

I made some changes to the User Interface to work better on a smaller screen, but for the most part, this version of the application uses the same code as the browser and the desktop versions: same data feed, subscription logic, model, controller, components, etc. This made it amazingly easy to take an existing Flex application and deploy it on Android… Three different deployment targets (Browser, Desktop, Mobile), same programming model, same language, same tools, same code.

The developer prerelease of AIR for Android is now available. More information here.

Using the Flash Builder 4 Data Centric Features with Parsley (and other frameworks)

I have blogged about the new data-centric features in Flash Builder 4 here and here. One question people often ask me is: “Can I use this feature if I use a Framework (Cairngorm, Mate, Parsley, Spring ActionScript, Swiz, etc)?”

The answer is yes: The classes generated by Flash Builder (Value Objects and Service Stubs) are standard building blocks that are part of most RIA design patterns, regardless of whether or not you use a framework.

The way you leverage these classes in your application may differ slightly depending on the framework you are using. For example, each framework may have a different approach to configure service endpoints or to instantiate generated service stubs.

To demonstrate this, I built a version of my “Contacts” application (also known as InSync) using the Flash Builder 4 data-centric features and the Parsley Framework.

[Read more...]