AIR 2.6 Applications and the Amazon Appstore for Android

Update (4/15/2011): The first URL I posted has been deprecated. The new URL is now below.

With the upcoming launch of the Amazon Appstore for Android, AIR developers are wondering if they can take advantage of this new distribution channel. Starting with AIR 2.6, the answer is yes!

The key to making your AIR applications compatible with the Amazon Appstore for Android is overriding the runtime download URI. The runtime download URI specifies the location from which the runtime will be downloaded if it’s not already installed. The default URI points to the runtime in Google’s Android Market, but starting with AIR 2.6, that URI can be overridden.

The version of ADT in the 2.6 AIR SDK supports the new airDownloadURL command line option when packaging your APK file. To make your AIR 2.6 application compatible with the Amazon Appstore for Android, your ADT command should look something like this:

adt -package -target ( apk | apk-debug | apk-emulator ) ( CONNECT_OPTIONS? | -listen <port>? ) ( -airDownloadURL )? SIGNING_OPTIONS <output-package> ( <app-desc> PLATFORM-SDK-OPTION? FILE-OPTIONS | <input-package> PLATFORM-SDK-OPTION? )

When building an APK for the Amazon Appstore for Android, there are three things to be aware of:

  1. Android applications built with Adobe AIR 2.5 (the first version to support Android) won’t work with the Amazon Appstore for Android because the runtime download URI points to Google’s Android Market. You have to repackage your application with the AIR 2.6 SDK using the airDownloadURL flag to make it compatible.
  2. You will need to build two separate APK files — one for Google’s Android Market, and one for the Amazon Appstore for Android. Although you will have to manage the process of building two separate APK files, your application’s code doesn’t have to change at all. The only difference is the packaging process.
  3. The Amazon Appstore for Android does not support filtering on processor type. Adobe AIR for Android requires an ARMv7-A processor which means users who have both Android 2.2 or higher (the minimum Android version AIR requires), and an ARMv6 processor, can still download AIR applications even though they won’t work. Amazon and Adobe are working together to get this issue resolved as soon as possible.