2011-06-29

My first Flex 4.5.1 android mobile application

So I finally got myself an Android tablet this passed week and needless to say I've been playing with it ever since. And of course today, I build my first application with it using both the Android SDK and Flex 4.5.1. But it wasn't just click a button and voila! I had to go thru several steps and just wanted to note them all here, just in case someone else is getting started in the mobile development environment anytime soon and will be going thru the same thing as I experienced.

Before I get started, the tablet I bought is the Asus Eee Pad Transformer TF101, which you can read all about here. Its a nice 10 inch tablet at an affordable price of $399 CAD. And my PC is running Windows 7 Service Pack 1.

So here are the steps that I took to build my first "Hello World" application:
  1. Enable Debug mode on your device.
  2. Download and install the USB driver for your device. The Android web site links to whole list of OEM sites, so you can find the one for your device. In my case, Windows 7 installed it on its own.
  3. Download the latest Android SDK from here. I downloaded the zip version and extracted to my folder of preference.
  4. Since we are using Eclipse for our development, install the ADT plugin by following the instructions on this page. I am using Eclipse Helios (3.6).
  5. Once the ADT plugin is installed, start Eclipse and go to Window > Android SDK and AVD Manager. You can now download and install some extra components related to the Android SDK. The most important one as I recall is the "Android SDK Platform-Tools".
  6. Again within the Android SDK and AVD Manager (see above step), under Virtual Devices, add your device... I just had to specify Name, Target, SD Card size.
Once I had done all these steps, I was ready to rock'n'roll. Once way to check that your device and your PC are talking to each other is to do the following:
  1. Open a console window
  2. Goto <android sdk>\platform-tools folder
  3. Run the following command: adb devices
You should see your device listed with some alphanumeric identifier assigned to it. If you dis-connect it from the USB port and run this command again, you should see that the device is no longer listed.

The next thing that I did was to create a Flex Mobile Project and just add a label to the UI and set its text property to "Hello World". Then I ran the application and voila, the application was compiled and auto-deployed and auto-launched on my device!

NOTE: Make sure that the Run Configuration has it's Launch Method set to On Device.

I hope these steps help out all those that are getting started in Android development with Flex!

8 comments:

Rocksoccer said...

This step does not seem to be necessary.

Again within the Android SDK and AVD Manager (see above step), under Virtual Devices, add your device... I just had to specify Name, Target, SD Card size.

Joomla Development said...

Android Mobile Application Development Offshore Outsourcing Company in India. And Technologies empowers the capabilities of Outsource Android. I guess you will receive good appreciation.

Mobile Application Development said...

Good to know about this and i think this is really gonna help in rich internet applications.

gowshika said...

interesting blog. It would be great if you can provide more details about it. Thanks you



Mobile Application Development

moonar said...

Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!



Mobile Application Development

Soulshift Pitt said...

Have you ever tried, making a flex application that "successfully" plays a video on an android device?...

Girin Jackson said...

Hey nice way of sharing about android mobile application. Keep Sharing… Thanks!

Anonymous said...

Pornography 's all right if you are a grownup - just in moderation. There are plenty of categories to decide on from. Someone who's a foot fetish usually
likes a particular type of feet or footwear.



My homepage :: live sex chat