Friday, 21 May 2010

Here's a quick guide that I've put together on getting an Adobe AIR runtime installed in an Android emulator running 2.1 (Eclair). I haven't had any chance to do testing on this process, but the runtime seems to install OK. I'm off on holidays soon, so if I get chance I'll put up a quick post of how to create and install a Flash application, but I'm getting short of time, so here at least is a guide to installing the AIR runtime in an emulator running 2.1. Yes that's 2.1 not 2.2.

First thing you'll need to do is to sign up for the adobe prerelease. Which you can do here:

Once you've done that you'll get a login and will be able to download the software and documentation:

I'm not going to use the AIR for Android CS5 extension, so I've just down loaded the AIR for android builds and the related documentation.

These are the options that you have to download the the AIR for Android builds.

As you can see there are runtimes for Eclair and Froyo, so even if you do not have a phone that is running Android 2.2 you can still have a runtime for Android 2.1. There is even a runtime emulator for Eclair so if you don't have an actual device with either 2.1 or 2.2, you can still try your AIR applications out in an emulator! Since I only have an emulator I'm going to use this runtime on my setup. So the runtime that we are interested in here is, Runtime_Emulator_Eclair_20100517.apk.

The fact that you can run applications on 2.1 is also born out in the FAQs:

To develop an AIR for Android application using the command-line tools, you will need a recent Flex SDK and the AIR 2.5 SDK available on the AIR for Android prerelease website. You'll use the Android SDK tools to install the application on a device or Android emulator.

I don't have a device that runs Android 2.1 or 2.2. So I'm going to install the AIR runtime in an emulator. First make sure that your Android SDK is updated so that it supports Android 2.1. Then go to the tools directory of you Android SDK installation and run:

android list targets

This will give you a list of target ids , at least one of which should correspond to Android 2.1. Once you have the correct target id for Android 2.1 you can then create the AVD with this command:

First we need to make sure the we have a AVD (Android virtual device) that supports android 2.1. using this command:

android create avd -n avd2.1 -t 11

You should see something like:

Created AVD 'avd2.1' based on Google APIs (Google Inc.), with the following hardware config:hw.lcd.density=160

To see the list of available avds use the command:

android list avds

To start the emulator with our AVD we use the following command:

emulator -avd avd2.1

Once we have the emulator running with the correct AVD we can now try and install the AIR runtime!!

Tuesday, 18 May 2010

I've haven't had much chance to post lately, there's been a lot going on in my life. I won't go into details but honestly I've been really busy! I'd also just like to say thanks to all the people who have got in touch with me, making suggestions and giving such positive feedback, it really is great to know that what I've written here is useful to loads of people out there.

OK so now onto the promised info' in this post, Froyo and Android 2.2. It looks like Google I/O tomorrow is going to be the day when we finally see the new Version of Android 2.2. It's been a while since 2.1 so it's going to be really interesting to see what is going to be new in Android 2.2. Some of the main new feature that are being touted are:

An all new JIT compiler, with some great speed increases.

Full support for Flash 10.1

Easy upgrading, some unbundling of apps from the main core.

USB tethering so you can share your data connection with your laptop

Portable Wi-Fi hot spotting for other devices.

These new feature are certainly interesting and there may be more yet to be announced. I do really like the idea of being able to easily upgrade to new versions of Android, at the moment it is really frustrating to be stuck on older versions of the OS , mainly due to the fact that it takes so long for manufactures to integrate their own UI mods into the new versions. Might it be technically possible for Google to push out firmware updates via the Android Market in future? Maybe not for older handsets, but if every phone that launches from the Froyo era onwards could have its OS updated free from network delays and interference it'd be a great move.

But for me the first two features on the list are the most interesting. The performance improvements achieved by the Dalvik JIT compiler simply sound astounding, with reports that there are improvements of 450%. Android Police have a a great article here detailing how they have used Linpack to benchmark the performance of Froyo.

Flash is also another big feature. Yes, there's been so much talk about this, and how well flash will run, but this has gotta to be a huge feature. I'm really looking forward to checking this out, hopefully it will be possible to compile and run flash apps within the new version of the Android emulator. Also if Flash 10.1 is going to be running on the likes of Symbain, Web OS and Blackberries this will give developers so much more scope to reach across platforms. Once I've checked a few things out here I hoping to give some tutorials on writing flash applications for Android, so keep reading this blog!

Yes, Android Froyo 2.2 really does sound like it's going to be a great release. I can't wait to see how it really flies. Now I just need to get my hands on a Android phone running 2.2. Anyone know how I can get hold of a nexus one in the UK? ;)

About

My Name is Neil Davies and this is my blog. I live in the UK in the beautiful city of Bath. I've worked as a software engineer for a number of years in a variety of roles and with a wide range of technologies and programming languages. My special interests are in UI design and UX. Currently I'm enjoying programming on the Android platform. When I'm not programming I enjoy messing about on the water, which includes sailing, kayaking and surfing. If you'd like to get in touch email me at interfuser at googlemail dot com or say hello on Google plus, just click on the icon above.