Publishing AIR Apps to the Android Market

Now that the AIR for Android runtime has been released it means you can publish applications that you’ve created with the AIR for Android prerelease to the Android Market. If you’ve published to the App Store, fear not, this is muuuuch easier.

The first thing you need to do is get your developer account set up. To do that, browse to http://market.android.com/publish/Home and you’ll be prompted to fill out some information about yourself as well as pay $25 via Google Checkout. It seems like the developer name has to be unique, which seems odd, but when I put in “Ryan Stewart” it said it was taken.

Once the process is completed you’ll be able to start uploading applications. The initial screen will show nothing but an empty blue box and a button for uploading apps. That takes you to the pretty self-explanatory upload page.

Now is a good time to see about creating the certificate and, if you haven’t already, compiling the application. The Android Market lets you use a self-signed certificate and using adt you can create your own self-signed certificate. (Remember that you’ll need to be using adt from the AIR for Android prerelease). The only requirement is that it has to be valid for 25 years. The format is this:

adt -certificate -cn name [-ou org_unit][-o org_name]
[-c country] [-validityPeriod number_of_years] 
key_type pfx_file password

And the example I used is this:

./adt -certificate -cn MyFirstSelfCert -ou ryanstewart 
-validityPeriod 25 2048-RSA ~/Certificates/newselfcert.p12 
mypassword

This creates a 2048-RSA certificate in my Certificates directory with the name newselfcert.p12 and a password of mypassword. Now that you have that certificate created you can use it to package your APK file. Assuming you’ve already created a release version of your AIR for Android application you can use adt to compile an apk file with the following command (or use the much simpler and better Package Assistant Pro by Serge):

./adt -package -target apk -storetype pkcs12 -keystore 
PATH_TO_YOUR_CERTIFICATE -storepass 
YOUR_CERTIFICATE_PASSWORD YOUR_APPLICATION_NAME.apk 
YOUR_APP_XML_FILE-app.xml YOUR_SWF_FILE.swf

That command (when you replace the capital letters) will build an APK file (that’s the -target) out of the app-xml file and the .swf file and use the certificate you just created to sign it.

And you’re pretty much all set. Upload the APK to the Android Market, give it some snazzy screenshots, a great description, and start making money!

  • Linto

    Hi Ryan,

    I’m residing in India and is it possible for me to publish (free/paid) apps in the android market yet?

    Thanks,
    LINTO

  • ryanstewart

    Hey Linto, I think so. Assuming that the AIR Runtime is available to you on the Android market, you’ll just have the same restrictions any other paid app in India will have.

    =Ryan

  • Shen

    Hi Ryan,

    Because the AIR app must run on AIR runtime, but how do we make sure the people know how to install the AIR runtime on their devices?

    I worry about that if a guy bought my AIR app, but my app must run on AIR runtime, and the guy doesn’t know he must install the AIR runtime on his device.

    Thanks.

    Shen

  • ryanstewart

    Hey Shen, I just blogged about this – http://blog.digitalbackcountry.com/2010/10/what-happens-when-your-users-install-an-air-for-android-application-without-air/

    Basically when they try to run the application they get a screen that tells them they need to install the AIR runtime first. There’s a link on that screen that takes them to AIR for Android in the Market.

    =Ryan

  • Shen

    I got it! thank you very much. :-)

  • Eden

    What about specifying that the compiled app can be moved to the SD card? With none of the Adobe apps on Android being able to be moved, my Nexus One is to the rim… I barely have room to put my AIR apps on for testing. What are the chances of Flash, AIR and Reader getting the Move to SD option?

  • ryanstewart

    I don’t know that you’ll be able to move the runtimes to the SD card. But you can create apps that can be moved to the SD card. I’m not totally sure what the line of code in the app-xml file is, but it’s just going to look like one from the android manifest file.

    =Ryan

  • Eden Soto

    Thanks Ryan for the reply, I’ll look into it.

    This is just too awesome though… just posted my first app to see how the whole process would go and it was just ridiculously simple.

    Search for “I <3 AIR" on the Market (:

  • http://mmmlabs.com Momo the Monster

    It’s worth noting that you should probably set the following:

    I failed to do this at first, and quickly got a 1-star rating from someone who tried to run the app on Android 2.1 (which is unsupported by AIR for Android).

  • ryanstewart

    Hey Momo, what command? Looks like the code got stripped out.

  • Justin Buser

    A couple questions/answers/comments:

    Is there any sort of delay or approval process between uploading an app and seeing it in the market?

    What process/functionality/API/documention/etc… is in place at the service provider level to verify that a purchased application is being run on the phone it was purchased on. Any links?

    Is there any way to send a notification or add a status icon or something similar when the application is running but not visible? (I’ve seen advanced task killer do this among others)

    I’ve been using the Hero sdk, are their any known compatibility issues or bugs I should be aware of?

    Is there a per publisher rating anywhere or is it just per app?

    Eden: I’ve installed several test apps on my Evo and been able to move them to the SD Card no problem without any source modifications. Additionally File.documentsDirectory is on the SD Card if you’re looking for a place to store larger components.

    Momo, I’m on the edge of my seat man, come on!

  • Justin Buser

    A couple questions/answers/comments:

    Is there any sort of delay or approval process between uploading an app and seeing it in the market?

    Is there any benefit to buying a cert from a recognized CA like Verisign or any indication to the end user similar to that displayed for desktop air application installations?

    What process/functionality/API/documention/etc… is in place at the service provider level to verify that a purchased application is being run on the phone it was purchased on. Any links?

    Is there any way to send a notification or add a status icon or something similar when the application is running but not visible? (I’ve seen advanced task killer do this among others)

    I’ve been using the Hero sdk, are their any known compatibility issues or bugs I should be aware of?

    Is there a per publisher rating anywhere or is it just per app?

    Eden: I’ve installed several test apps on my Evo and been able to move them to the SD Card no problem without any source modifications. Additionally File.documentsDirectory is on the SD Card if you’re looking for a place to store larger components.

    Momo, I’m on the edge of my seat man, come on!

  • Justin Buser

    I apologize for the double post, the server seems to be overloaded, hopefully because of the interest in this particular blog :)

  • ryanstewart

    Hey Justin,

    There’s not much of a delay as far as I can tell. We also don’t have any APIs to verify that a purchased app is being run. I’m not sure Android has those either. And in AIR 2.5 you won’t be able to use any of the notifications/system tray so you’re limited to the main window.

    Shouldn’t be issues with the Hero SDK. And I don’t know if there is a per publisher rating or if it’s just per app.

    =Ryan

  • Justin Buser

    What about determining the phone number/esn/min/etc… of the device the app is running on? At least that way you could track how many people are running it vs how many have paid.

    What level of information is made available by google when an app is downloaded/purchased? Do you get any information about the user/device?

  • Justin Buser

    Another quick question, is it possible(assuming the user has allowed unknown application sources) to install/launch android air apps from an installer badge on a webpage?

  • http://blog.dreamflashstudio.com cddin

    I get this msg when using Package Assistant Pro =This application descriptor file does not have the required supportedProfiles node.”

    and this is my xml

    main

    1.0.0

    main

    <!– To localize the description, use the following format for the description element.English App description goes hereFrench App description goes hereJapanese App description goes here–>

    main

    <!– To localize the name, use the following format for the name element.English App name goes hereFrench App name goes hereJapanese App name goes here–>

    main.swf
    standard
    false
    true
    false
    portrait
    cpu
    false

    false

    false

  • ryanstewart

    I’ll check with Serge about that.

  • G5

    Do you have any information on licensing air for android apps?
    We have an app ready to go, but need to copy protect it,
    so far I have only found this thread with no resolution:

    http://forums.adobe.com/thread/761522

    Any insights you have are greatly appreciated!

  • Patricklemiuex

    Thanks, useful got my android air app in the market

  • http://www.facebook.com/profile.php?id=512753344 James Tibbles

    Great article, thanks. Have you used Adobe Air to develop apps with in-app purchasing? I’m developing an app that includes a number of world packs, each of which I would like the users to purchase if/when they want it, but I can’t find much information on the best approach for this.
    Thanks

  • http://www.facebook.com/profile.php?id=512753344 James Tibbles

    Great article, thanks. Have you used Adobe Air to develop apps with in-app purchasing? I’m developing an app that includes a number of world packs, each of which I would like the users to purchase if/when they want it, but I can’t find much information on the best approach for this.
    Thanks

  • Carodmgz

    Hi. There

    One question, does the certificate has to be in p12??? Or can you use a keystore certificate,

    We developed an app for a client, an he only has a keystore and we are having trouble to compile.