Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Adobe AIR Developer Center /

Using Flash Builder 4.5 to package applications for Google Android devices

by Jeanette Stallons

Jeanette Stallons
  • stallons.com

Content

  • Run and debug on a device
  • Get required certificates
  • Package for distribution
  • Where to go from here

Modified

27 June 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
ActionScript Adobe AIR Android deployment Flash Builder mobile

Requirements

Prerequisite knowledge

Familiarity with building RIAs using Flash Builder.

User level

All

Required products

  • Flash Builder (Download trial)

Note: This is an updated and expanded version of an article originally written by Andrew Shorten.

Flash Builder 4.5 includes support for packaging Flex and ActionScript applications for Google Android, Apple iOS, and BlackBerry Tablet OS devices. The process for acquiring signing certificates and provisioning application packages for the various platforms differs significantly.

This article and video aim to help ActionScript and Flex developers complete the necessary steps so that applications built in Flash Builder can be deployed to Google Android devices during the development, testing, and deployment phases of the project.

For more information on packaging applications for other platforms please read the following articles:

  • Using Flash Builder 4.5 to package applications for Apple iOS
  • Using Flash Builder 4.5 to package applications for BlackBerry Tablet OS
This content requires Flash To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player. To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Run and debug on a device

Unlike developing for Apple iOS and BlackBerry Tablet OS, you can deploy applications to Google Android devices for testing and debugging purposes without signing the application package.

Step 1: Enable USB debugging on the device.

  1. Make sure the device is not connected to the computer and then go to Settings > Applications > Development and select USB debugging on the device (see Figure 1).
Figure 1. Enable USB debugging.
Figure 1. Enable USB debugging.

Step 2: Attach the device to the computer.

Connect the Google Android device to your computer's USB port.

On Windows you may also need to install a driver for the device; this may be supplied as part of the software package for your device or you can follow the steps outlined in the Flex documentation to install the Android USB device drivers.

Step 3: Run the application on the device.

To install and run the application on the device, you create a run configuration to run on a Google Android device.

  1. In Flash Builder, select Run Configurations from the Run menu or from the dropdown list for the Run button and click the new or duplicate button to create a new run configuration.
  2. Name the new configuration, set the target platform to Google Android, set the launch method to On device (see Figure 2).
Figure 2. Create a run configuration for running on a Google Android device.
Figure 2. Create a run configuration for running on a Google Android device.
  1. Click the Run button. Flash Builder packages the application as an APK file, transfers it to the device, installs the AIR runtime on the device (if not already installed), and launches the application (see Figure 3).
Figure 3. Install and run the application on the device.
Figure 3. Install and run the application on the device.
  1. Look at the list of applications on the device. You will see your application listed using a default name and icon (see Figure 4). You will learn to customize the name and icon in a later section.
Figure 4. Locate the installed application on the device.
Figure 4. Locate the installed application on the device.
  1. Locate the Google Android package file, the APK file, in your project's bin-debug folder (see Figure 5). This is a debug version of the application for development. You learn to create a release version of the APK for distribution in the next section.
Figure 5. Locate the debug Google Android package created.
Figure 5. Locate the debug Google Android package created.

Step 4: Debug the application on the device.

To debug an application on a device, you use Flash Builder to create and install a debug APK package just as you did for running the application on a device. For debugging, though, your computer and the device must be on the same Wi-Fi network. The USB cable is used to install the application on the device; the Wi-Fi network is used for all communication between the device and Flash Builder when the application is running and being debugged.

In Flash Builder, select your Google Android device configuration profile from the drop-down menu for the Debug button and click Debug.

If you get a dialog box asking for the IP address of the host computer, enter it.

Flash Builder installs and launches the application on the device as before, but now when a breakpoint in the code is reached, the application will freeze and you can use Flash Builder to step through code exactly as when using the device emulator

If you have trouble debugging on the device, check to see if you computer is on a VPN or using a firewall. If the computer is on a VPN and the device is not, you may need to take the computer off the VPN for debugging to work. If you have a firewall turned on, try disabling it. If you cannot or do not want to disable it, try opening port 7935, the port used by the Flash Builder debugger to communicate with the device.

Get required certificates

To create a release build of the application for distribution, you need to sign the application package when it is created with Flash Builder. The digital signature has two main purposes: to provide significant assurance to your users that you are a trusted signer whose code will not do anything malicious to their computers and that the application they are installing has not been accidentally or maliciously altered since it was packaged.

You can generate a self-signed certificate using Flash Builder or you can get a certificate from a certificate authority. When using a self-signed certificate, the application pubilsher will show up as UNKNOWN. Google does not require certificates issued by a certificate authority.

Step 1: Create a self-signed certificate.

For development, it is quick and easy to just use Flash Builder to create a self-signed certificate.

  1. Go to Project > Properties > Flex Build Packaging (or ActionScript Build Packaging for an ActionScript mobile project) > Google Android.
  2. Select the Digital Signature tab and then click Create (see Figure 6).
Figure 6. Navigate to the Google Android packaging settings.
Figure 6. Navigate to the Google Android packaging settings.
  1. In the Create Self-Signed Digital Certificate dialog box, enter your name, country, and a password; select 2048-RSA as the type; and then save the P12 file to a location on your computer (see Figure 7).

You should sign all versions of the application (including updates) with the same certificate.

Figure 7. Create a self-signed certificate.
Figure 7. Create a self-signed certificate.

Step 2: (Optional) Get a certificate from a certificate authority.

Before publishing your application, you will probably want to get a certificate from a certificate authority. You can get a security certificate from a trusted third-party vendor, a certificate authority, such as ChosenSecurity, GlobalSign, Thawte, or VeriSign.

For more detailed information on acquiring a trusted certificate, see the article Packaging Adobe AIR applications for the desktop.

Package for distribution

When you have completed development and testing, you use the Export Release Build wizard in Flash Builder to create a release version of the application for publication on the Android Market.

Step 1: Modify the application descriptor file.

Before using Flash Builder to create a release build of the application, set application properties and Google Android specific settings in the application descriptor file.

  1. Open the application descriptor file.
  2. Set the application's ID to a unique ID (reverse domain name notation is typically used), the name and filename to the value you want to appear on the device, set the versionNumber (you should update this for each release build posted to the Android Market), and any other info you want to specify (see Figure 8).
  3. See Common Settings in the AIR documentation for descriptions of other settings.

Figure 8. Set application info.
Figure 8. Set application info.
  1. Locate the icon tag and specify PNG files for the application icons (see Figure 9).
  2. For Google Android applications, you should provide 36x36, 48x48, and 72x72-pixel PNG images, which are used for low-density, medium-density, and high-density screens, respectively.

Figure 9. Specify application icons.
Figure 9. Specify application icons.
  1. Locate the android tag and modify Android specific settings (see Figure 10). Usually, you just set the Android permissions needed by your application within this element.
  2. See Android settings in the AIR documentation for descriptions of these settings.
Figure 10. Set Android specific settings.
Figure 10. Set Android specific settings.

Step 2: Create a release build of the application.

When exporting for the Google Android platform, you must sign the application with either a self-signed certificate or a trusted certificate from a certificate authority. Google does not require certificates issued by a certificate authority.

  1. Select Project > Export Release Build and make sure Google Android is selected as a target platform (see Figure 11) and click Next.
Figure 11. Export a release build.
Figure 11. Export a release build.
  1. Browse to your P12 certificate, enter its password, and click (see Figure 12). The release version of the package file, the APK, is generated and the application is installed on any connected devices.
Figure 12. Specify Android packaging settings for a release build.
Figure 12. Specify Android packaging settings for a release build.
  1. Locate the application icon on the device (see Figure 13).
Figure 13. View the new application name and icon on the device.
Figure 13. View the new application name and icon on the device.
  1. In Flash Builder, locate the release APK package (see Figure 14).
Figure 13. Locate the release APK package.
Figure 13. Locate the release APK package.
  1. You can now upload this APK to any application store like the Android Market. For info on uploading your application to the Android Market, see its developer documentation.
  2. An application created with the Flex 4.5 SDK requires Adobe AIR 2.6 or later to run. The required runtime version is specified in the application's application descriptor file (see Figure 8). If a device does not have the AIR runtime or the appropriate version of the runtime, the user will be prompted to download and install the AIR runtime the first time the application is launched on the device.

Where to go from here

In this article, you learned to use Flash Builder to run and debug Flex and ActionScript applications on Google Android devices. You also learned how to create a release build of your application for distribution. For more information, see the following resources:

Documentation: Developing Mobile Applications with Flex and Flash Builder

  • Run and debug mobile applications
  • Package and export a mobile application
  • Connect Google Android devices

Documentation: Building Adobe AIR Applications

  • Digitally signing an AIR file

Documentation: Developing AIR applications for mobile devices

  • Setting mobile application settings

Websites

  • Adobe's Mobile and Devices Developer Center
  • Publishing on Android Market

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

More Like This

  • Distributing AIR in the enterprise
  • Performance-tuning Adobe AIR applications
  • Tips for building AIR applications that can be easily updated
  • Adobe AIR and the experience brand
  • Deploying Adobe AIR applications seamlessly with badge install
  • Using the Adobe AIR update framework
  • Getting started with the custom install badge
  • Building Lupo: A case study in building commercial AIR applications
  • Using Badger for Adobe AIR applications
  • Developing cross-platform Adobe AIR applications

Tutorials and samples

Tutorials

  • Using the iOS Simulator to test and debug AIR applications
  • Using the Amazon In-App Purchase Adobe AIR native extension for Android and Kindle Fire
  • Transferring data with AIR native extensions for iOS – Part 3
  • Exchanging Vector and Array objects between ActionScript 3 and C, C++, or Objective-C

Samples

  • Licensing Adobe AIR applications on Android
  • Using web fonts with Adobe AIR 2.5
  • Using Badger for Adobe AIR applications

AIR blogs

More
07/09/2012 Protected: Publishing Adobe AIR 3.0 for TV on Reference Devices
07/08/2012 Source Code: Adobe AIR 3.3 Retina Video Application
07/06/2012 Application specific File Storage on Adobe AIR based ios Application
07/04/2012 Recent Work - iPad/Android App: Inside My toyota

AIR Cookbooks

More
02/09/2012 Using Camera with a MediaContainer instead of VideoDisplay
01/20/2012 Skinnable Transform Tool
01/18/2012 Recording webcam video & audio in a flv file on local drive
12/12/2011 Date calculations using 'out-of-the-box' functions

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement