Book Image

Flash Development for Android Cookbook

By : Joseph Labrecque
Book Image

Flash Development for Android Cookbook

By: Joseph Labrecque

Overview of this book

Flash has now arrived to Android — the fastest growing smartphone platform. This offers massive opportunities for Flash developers who want to get into mobile development. At the same time, working on smartphones will introduce new challenges and issues that Flash developers may not be familiar with. The Flash Development for Android Cookbook enables Flash developers to branch out into Android mobile applications through a set of essential, easily demonstrable recipes. It takes you through the entire development workflow: from setting up a local development environment, to developing and testing your application, to compiling for distribution to the ever-growing Android Market. The Flash Development for Android Cookbook starts off with recipes that cover development environment configuration as well as mobile project creation and conversion. It then moves on to exciting topics such as the use of touch and gestures, responding to device movement in 3D space, working with multimedia, and handling application layout. Essential tasks such as tapping into native processes and manipulating the file system are also covered. We then move on to some cool advanced stuff such as Android-specific device permissions, application debugging and optimization techniques, and the packaging and distribution options available on the mobile Android platform. In a nutshell, this cookbook enables you to get quickly up to speed with mobile Android development using the Flash Platform in ways that are meaningful and immediately applicable to the rapidly growing area of mobile application development.
Table of Contents (18 chapters)
Flash Development for Android Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface

Configuring the AIR SDK to package AIR for Android applications on Windows


If we are using the open source AIR SDK (Software Development Kit) with another IDE or even editing our project in a simple text editor, we can still compile applications for distribution on Android through command line tools.

How to do it…

If you do not already have the Adobe AIR SDK, you must first download it from http://www.adobe.com/products/air/sdk/ and extract the files into a directory on your hard drive, C:\SDKs\AIR, for example. You must also set a PATH variable in your operating system pointing to the bin directory underneath the AIR SDK.

If you are using a Windows system, set the environment variable through the following steps:

  1. 1. Open the System Properties dialog. You can reach this dialog in many ways, the most direct being a right-click on My Computer. Then select Properties.

  2. 2. Choose Advanced system settings from the left hand menu.

  3. 3. Click on the button at the bottom of this window that says Environment Variables…

  4. 4. Click upon the PATH variable in this window and select Edit:

  5. 5. Now, simply add the location of your bin directory into the set of variables: If the last item in your variable value list has not been terminated with a semicolon, you must add one before every new item. For example: C:\SDKs\AIR\bin.

  6. 6. That should do it. Hit OK a few times and bring up the command prompt to verify that we've set this up correctly. Type in adt -version and hit Enter. If all is well, ADT will spit back a version string that looks something like adt version "2.5.0.00000".

How it works…

Setting a PATH variable on the operating system allows us to be able to invoke the AIR Android compiler, ADT, from anywhere in our system without having to traverse file directories and specify long path names.

See also…

If using a Linux or Mac operating system, you can also set specific environment variables from within the Terminal. See the next recipe Configuring the AIR SDK to Package AIR for Android Applications on Linux or MacOS for an example of this.