In this ever increasing series, we now come to the fun part. All the hard work is done. You’ve coded in Adobe AIR, tested on your computer…now we wrap it up all pretty.
A particularly nice feature of Flash Professional’s AIR package is the publishing settings. You specify a name for your app, whether you want to fix it as landscape, portrait or allow the phone to flip it depending between the two. (There’s an example template included which gives you the code to access the accelerometer, so you can have your app flip correctly).
Making an app requires a certficate containing your details. This certificate is password protected and bundled with the app. I’m not 100% sure what the point of this certificate is, but the wizard makes it very easy to create. Just don’t forget your password, which you need to publish the app!
You get to include icons (but don’t worry, they are png files, you don’t need a .ico program). Part of me always squees at these finishing touches. I get to pretend I’m all professional. 🙂
You also get to specify what you need your app to access in order to work. This allows users to decide if they want to install your app. If your app plays sounds, and want them to automatically silence if a cell is recieved, you can check a permission to read phone state. Use with caution! If you’re the maker of a widely successful vegetation vs undead game and you have this particular permission setting you block all non-phone tablet users from playing.
Building apps for iOS is very similar up to this point but here we must part gentle traveller, as I can guide you no further. As mentioned in Part 1, the certificate required to make an iOS app can only be generated by a Mac. Surely this is going to change at some point, but until then…
This bit should probably be a bit higher as let’s face it, if you’re making an app you’ll probably have been testing it all along. Just in case you didn’t know, plug your phone (or Samsung Galaxy Tab) into a handy USB socket (preferably one attached to the computer you’re using). Then go to Settings > Applications > Development and check USB Debugging.
And suddenly, your phone becomes the ultimate in user testing environments. In theory, if Adobe AIR will run on a phone, anything you get working on your phone will work in exactly the same way on any phone.
The final step before unleashing your app upon the world is editing the manifest. When you press publish in Flash, the program takes your flash file and wraps it up with the png icons you made, that certificate we talked about and an XML file generated in the publishing settings.
This XML file contains publishing data such as the permissions, the file name etc… It also contains the manifest. If you want your users to be able to move your app onto their SD Card thereby saving room on their phone’s internal memory, you need to edit this bit before you press publish – after you have finished editing the publishing settings otherwise Flash will overwrite your changes.
Open the XML file in Notepad++ or similar and scroll down until you find:
Now change the <![CDATA[manifest> bit to:
Which gives users the ability to move your app.
Sorry, it’s taken a while to get here. Basically, just hit “Publish”. Your app gets wrapped up as a .APK file. All ready for deployment.
The beauty of Android is that if you’re making a very specific app that the wider world doesn’t need to know about, you can distribute this APK file like any other file. Uploading it to your VLE or website allows users to download and install directly. They do need to ensure to have Unknown Sources checked, but that’s about it.
The Android Market
Where’s the fun in keeping apps all to yourself. Publishing to the Android Market is incredibly straightforward. You have to spend a one-off $25 to get a Developer account. There is no approval time, no one phones to check you exist or anything like that. Once your email is verified, you can upload your APK file and fill out all the details. The Market takes you through each section (you have to provide screenshots and promotional images etc…)
At the time of writing, I’ve only uploaded our Question Dice, but plan to upload more when the time allows. Making the video demonstrating its use was fun, but a word of warning, make sure to replace the audio before uploading to YouTube. I had to hurriedly delete and republish.
Sit back and watch
The statistics supplied by the Market are fascinating reading:
- 30% of the users are on Gingerbread, one on Honeycomb and the rest on Froyo.
- The devices range from the Galaxy Tabs to phones of every description to a host of other tablets.
- Outside of the UK, we have three users in the USA and one in Australia.
- We had a user in Spain, but they’ve uninstalled it 😦 I wonder why?
- Making apps can be as simple or as complicated as you like.
- Adobe Flash Professional allows you to make apps in Adobe AIR.
- Ignore all the “professional” AS3 coders who pretend AS3 is highly complex.
- Think about permissions and remember the install location setting for the manifest.
- Dont swear while filming your demo video.
As with everything I write about on this blog, things are often easier than they appear to be. The hard part is finding good tutorials and websites and people willing to help. If nothing else, I’ve hopefully provided a summary of all the bits you need to get started.