Wednesday, 6 May 2009

Android vs iPhone : The winner is ... Android

A friend of mine finally convinced me to have a play with the Android SDK. Since the 1.5 SDK is now available and 1.5 updates are slowly winging their way to Android handsets I decided to get stuck in and have a play.

I've had a MacBook Pro for a while, specifically for the purpose of building Mac OS and iPhone apps, but the one thing I've had to contend with is the Apple SDK. I can handle Objective C, trust me, but the examples are out of date and there's no simple tutorials which give you a broad overview of the device's capabilities. I love my Mac and the apps that I'm seeing become available for it are awesome and obviously developed with the Apple SDK. The iPhone has access to the very same SDK and even shares the same SDK documentation with notes and annotations when something is not available for iPhone.

All the Apple SDKs are low level. Programming in C was my first job, but rapid application development shouldn't require knowledge of pointers and there's no way to avoid this even with Objective C. The one thing that is slightly better is the UI builder. The Android UI builder is not quite so slick, but eventually I think a UI for building a UI can become a hinderence and I certainly end up defining the UI programmatically and not using the WYSIWYG features of the toolset. This is unavoidable with the Apple SDK because it is creating binary resources for you as you build your UI.

As a Mac user it is also easy for me to forget that you have to use Mac OS to develop with the Apple SDK. For Android the SDK will run on any platform supported by Eclipse and the SDK, which I believe includes Mac, Linux and Windows. A much wider community of developers can instantly get stuck in.

The first thing that hit me about the Android SDK was how easy it was to get going. The download page has detailed instructions on how to get setup, including downloading Eclipse, installing the plugins and installing the Android SDK. There are then two tutorials - a very quick Hello World and a more indepth Notepad example. Neither are particularly broad, but introduce you to the essential concepts.

Note that you don't even need to use Eclipse - but it is a great tool and the Android peeps have provided some great tooling based on it. Likewise I can imagine how you might not actually need to use XCode to develop Mac / iPhone apps, but I would think XCode makes it a lot easier.

(Once you've done these tutorials I recommend reading this: it blew my mind - in a good way!)

So I was able to do in a couple of evenings with Android what I had failed to do in several months of having the Apple SDK at my finger tips... but of course, that's just me. I believe there are several other reasons why Android 'wins'.

As a techy and developer, the most important feature that Androd has, which iPhone doesn't, is the ability to run multiple applications at the same time. This is actually very clever life-cycle management (see above link), but the iPhone only allows one foreground application and iTunes to run which is very limiting and in flexible. The Android SDK encourages collaboration, which seems to be the Google way.

After a bit more investigation I find that the way Android handles applications is just mind blowing. If my Android application (as complicated as I want, e.g. with multiple views, called Activities) exposes a service, other applications can access that service. No big deal until you find out that Android is able to instanciate *just* the service part of my application if it is not already running.

There's a whole bunch of other amazing technical things happening under the covers, and it is all layed out to bare on the page. In contrast with iPhone, while all the technical information for iPhone is available online, I find it difficult to read, obtuse, out of date and with unclear examples.

The next reason Android 'wins' is that it isn't restricted to a single device. OK, iPhone apps work on iPod Touch as long as they don't use GPS, Mic or Camera, but Android is already appearing on multiple handsets (the G1, the Samsung i7500 and HTC Magic) and on multiple providers (t-Mobile and Vodafone). There is no way the likes of Orange will let something like Android elude them, so it won't be long before all the carriers jump on board and before we know it Android is everywhere. Where will iPhone be ... well, still on the iPhone and in O2 of course, though I can't imagine O2 not having an Android phone as well, unless they've agreed not to with Apple.

Anything else? Well one more thing - the market place. Apple's App Store is rapidly gaining a reputation as difficult for developers to interact with. Android's approach is typically Google like in that it is more open. You don't have to use the store to get your apps on to devices, and Google isn't as restrictive about what apps it allows. Further more the Android market place has a refund policy. Return the app within 24 hours for a full refund.

Does iPhone have anything going for it? Well yes, a few things, but I think they are actually pretty minor. Firstly, it is ultra-cool looking, like all Apple gear. Secondly, it has multi-touch. As far as I know multi-touch isn't supported on Android.

Lastly, games. As weird as this is, given how hard it is to get games for Mac, games for iPhone are appearing all the time and by big name developers, e.g. Spore and I recently purchased the arcade classic Silent Scope. With people like John Carmack of "id Software" saying things about iPhone like:
more powerful than a Nintendo DS and PSP combined
it is easy to see that people's attention will be directed at the iPhone/iPod Touch as a mobile games platform. I'm not going to disagree because I love playing games on my iPod Touch. "id Software" recently released Castle Wolfenstein 3D for the iPhone - pretty cool.

I would definitely be interested to see a comparison of the graphical capabilities of iPhone vs Android. Of course, the advantage that Android has is that someone could create a piece of hardware that runs Android with gaming specifically in mind - the iPhone still has to wear its one size fits all glove.

So in conclusion, while I think iPhone is the 'coolest' handset on the market at the moment, and seems to be a really good gaming platform gaining popularity with games developers, from a phone application point of view iPhone doesn't do anything Android can't do (apart from multi-touch) and in fact, Android does so much more. In addition, by being handset independent (there are rumours of an Android driven 'web pad' on the horizon), it makes more sense for developers to target Android than it does iPhone, especially since it is easier and less restrictive for developers to get their Android applications out there.

I love my MacBook Pro for computing, my iPod Touch for music and cool games on the go and am waiting to get my hands on an Android phone for everything handset related.

No comments: