Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
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 / Flex Developer Center / Flex Test Drive for Mobile /

Flex Test Drive for Mobile: Deploy the application

by Adobe

Adobe logo

Modified

2 May 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Flash Builder Flex mobile

Video | Code | Tutorial | Links

Create an Android package

 

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.

Download the complete sample code (ZIP, 14.8 MB)

Code

FlexMobileTestDrive-app.xml

<?xml version="1.0" encoding="utf-8" standalone="no"?> <application xmlns="http://ns.adobe.com/air/application/2.6"> (...) <name>Employees</name> (...) <icon> <image16x16>assets/appicon16x16.png</image16x16> <image32x32>assets/appicon32x32.png</image32x32> <image36x36>assets/appicon36x36.png</image36x36> <image48x48>assets/appicon48x48.png</image48x48> <image72x72>assets/appicon72x72.png</image72x72> <image114x114>assets/appicon114x114.png</image114x114> <image128x128>assets/appicon128x128.png</image128x128> </icon> </application>

Tutorial

In the previous tutorial, you learned to debug a Flex mobile application. In this tutorial, you learn to package your application for distribution. Currently, a mobile application can only be packaged for the Google Android platform.

Step 1: Make sure the project is set up to use your public server.

Make sure the server files are deployed on the public server and that the Flash Builder project server settings and the photo URLs reference your public server. Make sure the device is connected to the computer via the USB cable.

For specific details on this set up, see the earlier tutorial, Run on a device.

Step 2: Locate the debug package file.

In the Flash Builder Package Explorer, locate the APK file in the project's output folder (see Figure 1).

The first time you run or debug an application on a device, package files for the mobile project's target platforms are created. Currently, the only target platform is Google Android so an APK file, an Android Package file, is created. The application is then installed on the device via the USB cable.

Locate the debug APK file.
Figure 1. Locate the debug APK file.

When you are developing an application, a debug version of the application SWF is created and stored in the project's output folder. This SWF file includes additional code and metadata that the debugger uses. The APK file in this folder contains this SWF. When you are done debugging and ready to deploy, you need to create a release build of the application—a smaller, nondebug version of the SWF file and its corresponding APK file.

Step 3: Specify an application name and icon.

In the application descriptor file, set the name element to Employees and the icon element to the appropriate appicon.png files located in the assets folder.

Right-click FlexMobileTestDrive-app.xml and select Open With > Text Editor. Uncomment and modify the name and icon elements. Your code should appear as shown here:

<name>Employees</name> (...) <icon> <image16x16>assets/appicon16x16.png</image16x16> <image32x32>assets/appicon32x32.png</image32x32> <image36x36>assets/appicon36x36.png</image36x36> <image48x48>assets/appicon48x48.png</image48x48> <image72x72>assets/appicon72x72.png</image72x72> <image114x114>assets/appicon114x114.png</image114x114> <image128x128>assets/appicon128x128.png</image128x128> </icon>

Step 4: Create a release build.

Select Project > Export Release Build. In the Export Release Build wizard, select your FlexMobileTestDrive project and application, leave the Export to folder field blank (so the APK will be saved in the project folder), select Signed packages for each target platform (see Figure 2). Click Next.

Create a release build.
Figure 2. Create a release build.

Step 5: Specify a digital certificate.

If you already have a digital certificate, click the Browse button in the Export Release Build wizard (see Figure 3) and select the certificate file. Otherwise, click the Create button (see Figure 3) and in the Create Self-Signed Digital Certificate dialog box, enter your info, specify where to save the file, and click OK (see Figure 4). Click Finish (see Figure 5).

Choose to use an existing certificate or create a self-signed one.
Figure 3. Choose to use an existing certificate or create a self-signed one.

You cannot package and distribute the application without a digital signature. 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. AIR code-signing certificates are sold by a number of companies, including ChosenSecurity, GlobalSign, Thawte, and Verisign; certificates are typically only sold to registered companies and the process includes submittal and verification of multiple company documents. Creating your own self-signed certificate (see Figure 4) is useful for developing applications.

If necessary, create a self-signed digital certificate.
Figure 4. If necessary, create a self-signed digital certificate.
Finish the export process.
Figure 5. Finish the export process.

The release version of the package file, the APK, is generated and the application is installed on any connected devices.

Step 6: Locate the release package file.

In the Flash Builder Package Explorer, locate the APK file (see Figure 6).

Locate the release APK file.
Figure 6. Locate the release APK file.

If you compare the sizes of the debug and release APK files, you will see the release APK is much smaller than the debug version.

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. 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 7). 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.

Locate the required AIR runtime version.
Figure 7. Locate the required AIR runtime version.

Step 7: View the new application name and icon.

Locate the application icon on the device (see Figure 8).

View the new application name and icon on the device.
Figure 8. View the new application name and icon on the device.

In this tutorial, you packaged your application for distribution. For further information on developing Flex mobile applications see the Mobile and Devices Developer Center.

Learn more

Refer to the following resources to learn more about this topic:

Documentation

  • Building Mobile Applications with Flex 4.5

Documentation: Building Adobe AIR Applications

  • AIR application descriptor files
  • Setting mobile application properties
  • Signing AIR applications
  • Packaging Adobe AIR applications

More resources

  • Adobe AIR Developer Center
  • Flex Developer Center
  • Mobile and Devices Developer Center

Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License+Adobe Commercial Rights

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

More Like This

  • Flex Test Drive for Mobile: Test and deploy your code
  • Flex Test Drive for Mobile: Add application functionality
  • Flex Test Drive for Mobile: Add application functionality

Tutorials and samples

Tutorials

  • Flex mobile performance checklist
  • Flex and Maven with Flexmojos – Part 3: Journeyman
  • Migrating Flex 3 applications to Flex 4.5 – Part 4

Samples

  • Twitter Trends
  • Flex 4.5 reference applications
  • Mobile Trader Flex app on Android Market

Flex user forum

More
07/25/2011 Flash Player Debug Issues - Safari 5.1 & Chrome 13
04/22/2012 Loader png - wrong color values in BitmapData
04/22/2012 HTTPService and crossdomain.xml doesn't work as expected
04/23/2012 Memory related crashes in Flex application

Flex Cookbook

More
04/06/2012 How to detect screen resize with a SkinnableComponent
02/29/2012 Embed Stage3D content inside Flex application components
02/15/2012 Custom WorkFlow Component
02/09/2012 Using Camera with a MediaContainer instead of VideoDisplay

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