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:
- Go to File→AIR Android settings.
- Under the Deployment tab, do the following:
- 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.
- For the Android deployment type, choose “Device release”.
- Under the “After publishing” section, select both “Install application on the connected Android device” and “Launch application on the connected Android device”.
- 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:
- Right-click on your project folder and select Properties.
- 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. - 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.