by Christian Cantrell

 Comments (13)

Created

March 21, 2011

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 http://www.amazon.com/gp/mas/dl/android?p=com.adobe.air )? 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.

COMMENTS

  • By Prasanth Kumar.S - 2:33 AM on March 22, 2011   Reply

    Can I upload AIR app created with HTML/JS to the store ?

  • By Rhys Halsey - 6:51 PM on March 22, 2011   Reply

    Is there a way to compile the air 2.6 application in flash cs5? If not are there any documented instructions on this from adobe on how to publish my apps for 2.6?

  • By fred - 3:16 AM on March 30, 2011   Reply

    no amazon support? bad…
    ADT commandline … sorry i need better tools…
    i will switch to native …

  • By willy - 7:05 PM on April 1, 2011   Reply

    Is this why Amazon been review my app for 4 month? and now i have to update and resubmit!!!

    no wonder Apple wins.

  • By Mikhail Popov - 8:14 AM on April 2, 2011   Reply

    There is a helpful thread that deals with Flash CS5 to Android publishing for Amazon Appstore

    http://forums.adobe.com/message/3568989

  • By Josh - 9:54 PM on April 5, 2011   Reply

    How about a couple of sample/simple ADT commands?

    “Should look something like this…” — you just copy-pasted the ADT help text

  • By Justin - 6:30 PM on April 13, 2011   Reply

    I had problems on the Mac until I put the -airDownloadURL in front of the -storetype command….

    So my full Terminal command that eventually compiled looked like…

    /Users/JustinsClone/AIK2.6/bin/adt -package -target apk -airDownloadURL http://www.amazon.com/gp/mas/dl/android/com.adobe.air -storetype pkcs12 -keystore mycert.p12 -storepass myPassword ninjatoss.apk ninja_toss-app.xml ninja_toss.swf icon48.png icon72.png icon36.png

    And EVERY file was in my user folder (JustinsClone).

  • By k9d - 4:33 AM on April 14, 2011   Reply

    fred … good luck with that … you’d be better off learning how to use ant scripts =)

  • By Alessandro - 2:25 PM on May 2, 2011   Reply

    Ciao,

    I succssfully compiled a AIR Mobile Android app for Amazon Appstore, here are the details:
    http://www.biskero.org/how-to-air-mobile-for-android-and-amazon-appstore-5606
    Alessandro

  • By Jack - 4:51 AM on May 19, 2011   Reply

    So I was finally able to create the APK file. This is my experience.

    There’s no need to download the Air SDK if you have the latest build of Flash Builder. You can target the ADT that is contained in your flash builder program folder.

    I also used the SWF file that was contained in the APK file that I created with Flash Builder for the Android Market to ensure it was a release build version.

    You can use the same certificate that you use to create an APK file for the Android Market; however, I’m not entirely sure the Amazon AppStore requires you to sign your app or if they do it for you. In any case, I used the same android p12 file that I used for the Google Android Market.

    Also, you will need to adjust the Application Descriptor XML file so the “application.initialWindow.content” node contains a reference to your SWF file. Flash Builder has a comment in this node that says that Flash Builder will automatically enter the correct value for this node. If you do not enter the correct value here, then you will encounter the following error when running the ADT command:

    error 105: application.initialWindow.content contains an invalid value.

    So once I did this, my command line looked something like this:

    “C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.0\bin\”adt -package -target apk -airDownloadURL http://www.amazon.com/gp/mas/dl/android/com.adobe.air -storetype pkcs12 -keystore C:\PATH2ANDROID_CERT\androidCertificate.p12 -storepass [your_password_here] C:\PATH2WHERE_YOU_WANT_THE_APK_FILE_2B_CREATED\WordZigZag.apk WordZigZag-app.xml WordZigZag.swf assets/*

    p.s. I ran the command line while I was in the directory that contained my SWF file. Also, my icon images and other files that my application uses are all contained in the subfolder “assets/” and I was able to target these files (as seen in my command line above) by using a wildcard after the subfolder — assets/*

  • By Josh Millstein - 4:09 PM on August 5, 2011   Reply

    Is there any way to see what flash cs5.5 is running at the adt command? I successfully created my apk file from adt but when I run it on my phone using adb.exe I just get a blank screen…. Any ideas on why that is. The amazon apk file is the same size as the android market file…. looks like it should be working

  • By Russell Houlden - 6:49 PM on January 14, 2012   Reply

    Thanks for the information, was finding it impossible to upload .apk files successfully to the Amazon store. After succeeding with one app (again, thanks for the tips!) we moved immediately to submit another. We kept getting errors. What we believe was the problem was the “Version Label” in the .xml file. Once removed, everything worked perfectly. It’s the only difference between one try at an upload of the .apk (which failed) and the next (success!).

ADD A COMMENT