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!
TweetRelated posts:
