Packaging Your Application As an APK File and Installing It on the Device

0
164

Let’s go over the process of packaging and installing your application on the device.

Using Flash Professional

To package the application as an APK file in Flash Professional and install it on the Android device, follow these steps:

  1. Go to File→AIR Android settings.
  2. Under the Deployment tab, do the following:
    1. a. For the Certificate, select your AIR code-signing certificate if you already have one. To create a temporary one, click Create and fill out the form. At this stage, the only important field to remember is the password  because you will need to enter it again shortly.
    2. For the Android deployment type, choose “Device release”.
    3. Under the “After publishing” section, select both “Install application on the connected Android device” and “Launch application on the connected Android device”.
  3. Select File→Publish. At this point, an APK file is created, which you can see on your computer. The APK file is installed on your device, and the device launches the application.

Using Flash Builder

To package the application as an APK file in Flash Builder and install it on the Android device, follow these steps:

  1. Right-click on your project folder and select Properties.
  2. Select ActionScript Build Packaging→Google Android→Digital Signature→Certificate. Select your AIR code-signing certificate if you already have one. To create a temporary one, click Create and fill out the form. At this stage, the only important field to remember is the password because you will need to enter it again shortly.
    Click OK.
  3. Go back to Run Configurations. Under the launch method, select “On device” and then click Run. At this point, an APK file is created, which you can see in your project. The APK file is installed on your device, and the device  launches the application.

If this is the first time you are launching an AIR application on your device, the Adobe AIR license agreement will appear. You only need to agree to the terms once.

If you are familiar with developing AIR applications on the desktop, you may have noticed a difference here. The warning dialog does not appear on the device upon installation. Instead, Android displays the list of permissions your application subscribed to.