Android Trader Desktop with Flex and AIR — Updated for Froyo + Source Code Available

A few weeks ago, I posted a video of a Mobile Trader Desktop application I built using Flex 4 and AIR for Android. I recently updated the application for Froyo (Android 2.2), and I can now share the application file and the source code.

Watch the video:

Download the Application and Source Code

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

The latest version of AIR for Android is available here.

NOTE: In this version of the application, the stock updates are simulated at the client side so that you don’t have to install the server infrastructure. Modifying the application to get the stock updates from a server is easy: use this application as an example.

Employee Directory Sample Application Using Flex and AIR for Android – Updated for Froyo

I finally took the time to rebuild the Employee Directory application with the latest version of AIR for Android (available here) to run on Froyo. See the links below to download the apk and the source code. (If you are still running Eclair see my original post).

The Employee Directory application demonstrates 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

"VoiceNotes for Android": Sample App using Flex, AIR, and the Microphone API

VoiceNotes for Android is a sample application built with Flex and deployed on Adobe AIR for Android. The application allows you to record voice messages and play them back later. It demonstrates the Microphone API introduced in the latest builds of AIR for Android. VoiceNotes for Android is based on the desktop version of VoiceNotes I recently blogged as an AIR 2 sample.

Watch the video:

Download the Application and Source Code

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

If you want to compile or run the application on your device, make sure you install the latest version of the AIR for Android SDK and Runtime respectively. The apk was built using the AIR for Android 20100720 build.

Creating a Web Server using the new Server Socket API in AIR 2

During the Adobe AIR 2 beta, I wrote a simple Web Server application to explore the new Server Socket API available in AIR 2. Here is the updated version of the application for AIR 2 GA.

The “Mini AIR Web Server” is a simplistic implementation of an HTTPServer. Needless to say that it is far from being a production quality Web Server. The goal here is simply to use the well understood mechanics of a web server to learn how to use server sockets in AIR 2.0.

Installation Instructions

Make sure you have the AIR 2 runtime installed (you can download the AIR 2 runtime here), and install the application using the badge below:

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

Testing the Application

To test the application, open a browser and test the sample HTML pages provided with the application:

NOTE: You may have to change the port number in these URLs depending on the port number you enter in the application.

You can add your own content in the webroot folder in the applicationStorageDirectory.

Downloading the project

Click here to download the project

Embedding Tomcat and BlazeDS in an AIR 2 Application

This was by far my most popular sample during the beta. So, here is an updated version for AIR 2 GA.

In this sample application, Tomcat and BlazeDS are embedded as part of the native installer. The first time you run the application, Tomcat is automatically copied to your applicationStorageDirectory from where the AIR application starts it. You can start and stop Tomcat manually from within the application, but in a real life application you would probably want to start Tomcat automatically when the AIR application starts.

[Read more...]

Tomcat Launcher using AIR Native Process API — Update for AIR 2 GA

I updated my “Tomcat Launcher” sample application for AIR 2.0 GA.

“Tomcat Launcher” allows you to start / stop Tomcat and view the standard output log without opening a DOS box or Terminal window. It also allows you to open that log in your default Text Editor which is another new feature of AIR 2.0 that I covered in the “AIR2Excel” sample application. Tomcat Launcher also provides a generic example showing how to use the AIR 2.0 native process API to execute Java code.

[Read more...]

"AIR 2 Excel" Sample App Updated for AIR 2 GA

I updated the “AIR 2 Excel” sample application for the official AIR 2 launch. “AIR 2 Excel” demonstrates different techniques for AIR/Excel integration, including the new AIR 2 File.openWithDefaultApplication() API.

[Read more...]

"Voice Notes" Updated for AIR 2 GA

To mark the official release of AIR 2, I’m upgrading the samples I built during the beta, starting today with “Voice Notes”.

Voice Notes is a sample application that leverages the new Microphone API. The application lets you record voice notes and store them in a SQLite database so that you can replay them later.

Make sure you have the AIR 2 runtime installed (you can download the AIR 2 runtime here), and install the application using the badge below:

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

View Source (right click) is enabled.

NOTE: You can download the AIR 2 SDK here.

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.