Flex Pasta » Mobile

Consider from the beginning of Flex, there have always been 4 layout types inside the SDK: Absolute, Horizontal, Vertical, and Tile.  Yes, tile layout(formerly the tilelist in 3.5), the much forgotten child, has been given new life in the Flex 4.5 SDK.  For the most part in applications, I never really had a use for a tile layout.  Enter Flex 4.5 and the multitude of different screen sizes that now exist for mobile applications.  For more larger mobile applications, the home screen component usually consists of some sort of navigation.  For example, icons tiled in a scrollable list:

Tile Layout DroidTile Layout Samsung Tab

Tile layout makes it easy to have an icon screen that flows among many different screen sizes, without any coding changes.  The same code generated the two screens above.  One showing the Motorola Droid and the other is the Samsung Tab.  The tile layout automatically takes advantage of the space given to it and lays out the icons to get the maximum utilization of the space.

Here is a live example on the Droid.  Notice that TileLayout automatically repositions the icons when the phone changes from portrait to landscape mode.

Check out how simple the code is to accomplish a tile layout. Read the rest of this entry…

Adobe has released Flex and Flash Builder 4.5 With this release, you can now start building AIR apps that can run on android and iPhone devices(including the blackberry playbook).   The upside to Flash Builder 4.5 for mobile devices is that I can build my application once, and deploy it to multiple platforms. Being a Java and Flex developer, this is huge! I don’t want to buy a mac book, learn objective C, or write an app multiple times just to publish something. AIR will reduce my cost to create a multi-platform application.

About 5 minutes to get an AIR app on your Android Device

Download the flash builder 4.5 release. Once it’s installed it literally takes 5 minutes to get a hello world app running on the phone.  Here is a rough outline on the steps to get a project up in running in flash builder 4.5

Step 1: Create a new mobile project from the file menu.

Step 1

Step 2: Create a project name

Step 1

Step 3: Determine the mobile settings.  These include the target platforms, device permissions the application will need, and even a set of starter templates!

Step 3

Step 3

Click finish and the project is setup and ready to go!

Running the AIR app on the Android Device

To run the AIR app on an android phone, the following prerequisites are required:

  1. The phone is plugged in the computer via USB
  2. The phone is in developer mode. On the android device, go to Settings > Applications > Development > Check the USB debugging check box
  3. Adobe AIR is installed on the mobile device

Once this is setup, right click on the AIR test project in Flash Builder and do Run As > Mobile Application. The launch configuration screen appears.

Flash Builder Mobile Launch Configuration

Be sure to check the “Clear application data on each launch”. The will deploy the latest code to the phone each time it is run.

Within minutes an AIR app can be running on the phone! To get started using device specific features, try downloading the Tour de Mobile Flex application available in the Android Market.