Who This Book Is For?
This book is for intermediate-to-advanced Flash developers who want to use their knowledge of Flash and ActionScript to develop AIR Android applications.
This book specifically focuses on the Android platform, but many of the topics and examples can be used to develop for any AIR mobile platform.
Introducing Android Devices
It is an exciting time to be a Flash developer. Adobe has taken big steps in making the Flash platform available on as many devices as possible. The Open Screen Project is an Adobe-led initiative whose goal is to “enable consumers to engage with rich Internet experiences seamlessly across any device, anywhere,” as it says on its Web site, at www.openscreenproject.org.
Introducing the Available APIs
With the ability to publish Android applications from Flash CS5 comes a set of new APIs that enable you to take advantage of some of the features the Android platform has to offer. However, Adobe’s strategy is not to support only the Android platform but as many platforms as possible. This is the reason you may not see as many Android-specific features as you may like or think. Adobe is being very pragmatic about what new features it introduces and how its APIs will look on future platforms, mobile or otherwise. Adobe’s goal is to provide one consistent API for all platforms. For example, the ActionScript code should be the same for accessing a camera whether you are developing applications for the Web, desktop, Android, iPhone, or any other future supported platform.
Become an Android Developer
In order to install applications on your device, you must first have it set up to enable debugging. Depending on which operating system you are currently developing on, the number of steps may vary. If you are developing on a Windows computer, you will need to download and install the USB driver package using the Android SDK and AVD Manager. This process is the same as installing the additional Android SDK components. For more details, see the section “Get the Android SDK” earlier in this chapter. If you already completed the steps in that section and selected all the available packages, there is a good chance that you have already installed this. You can check to see if it has been downloaded by looking for the usb_driver directory in the root of your SDK. The process for installing the drivers is different for each version of Windows, and I suggest that you follow the instructions on the Android Developers site, http://developer.android.com/sdk/win-usb.html, in order to install them correctly.
If you are using a Mac OS X computer for development, you can skip having to install the USB drivers. The steps below should just work.
You can now connect your device to your computer with the USB cable included with your device. If it has connected correctly, you should see the USB symbol in the notifications area of the status bar. The next step is to turn on USB debugging when the device is connected. To do so, on your device, you go to the list of options that can be used during development and choose to debug applications on the device.
[sociallocker]Click here to download the PDF file[/sociallocker]