Posts tagged "SDK"

Tips and Tricks for Using the Android SDK with AIR 2.5

During my free time, I have been developing some applications for my Android devices using Adobe AIR 2.5. I will soon be hosting a series on on AIR for Android development as a well as a preview series for them on Flex Burrito and Hero development. About a year ago, I tried my hand at Objective C development for iDevices and found the tool set and syntax very off putting. I am happy to report that my feelings about Android are the exact opposite!

I have really enjoyed using the development tools available in the Android SDK. I have made extensive use of the DDMS tool available in the tools folder of the SDK; this allows me to take a screen shot of my device and broadcast it on the computer screen, which is very useful for developing training material. I also found it useful to include the path to the Android SDK in my system environment PATH variable to limit switching directories.

I have been working with a Droid X and a Samsung Galaxy tab for testing. When I first started,  I had a difficult time getting the drivers working for both of these device using Windows. I tried to use the default USB drivers included with the Android SDK but I could not get them working. Once I downloaded the respective drivers from Motorola and Samsung everything worked fine. In order to do testing,  you must be sure that the devices themselves have USB debugging enabled which can be done from the settings menu of the device.

I have also been using the Android emulator that ships with the Android SDK. One gotcha here is that you need to publish an Android Emulator release of your APK file in order to use with the emulator. You can choose a radio button using Flash CS5 to produce this APK or pass the ADT a compiler argument of -emulator if you are using Flash Builder.   If you are doing AIR development, you have to install a special version of AIR on your emulator “virtual device”. I found it very difficult to locate the emulator version of AIR. I finally it in Flash CS5 under Program Files/adobe/adobe flash cs5/aek2.5/runtimes/emulator. You can then install the runtime using the Android ADB tool with the install command. I lost a few hours of development on that one, but now AIR 2.5 is permanently installed on my virtual phone and these virtual devices persist between sessions.

I have enjoyed exploring the mobile specific API’s in Adobe AIR 2.5 including the accelerometer, gestures, geolocation and much more, I look forward to posting more about these topics. AIR is a great way to develop Android applications, and I am getting more excited about the Android platform every day!