Hello Android

Introducing Google’s Mobile Development Platform
an Introduction to Programming Google’s Android OS.

Hello Android is one of the first books on Google’s Android platform. According to Google, “Android is a software stack for mobile devices that includes an operating system, middleware and key applications.” Android uses its version of Java-based on Java 5 as opposed to Java ME as its native language, and the developer toolkit is built around the Eclipse IDE which readers learn to set-up in the first section of the book.

Why Android?
One of the first questions the book tries to answer is, “What is the need for yet another platform for mobile devices, including some already built around Linux and Java?” The answer they give is that Android isn’t just an OS but an open-source environment that provides not only an OS but a host of components including audio/video playback, database, location sensing and other features that make developing applications easy.

Along with the  Open Handset Alliance, they have a platform in the shape of the T-Mobile G1/HTC Dream handset is taking steps to create an official market for applications, App Market, an apparent play on Apple’s AppStore.  Apple was right about the need for an AppStore; once you get past the early adopters, most people aren’t comfortable with the Internet equivalent of buying their software out of a car trunk. On the other hand, having one store where you need to go for everything sounds like Walmart at best, some kind of Cupertino corporatism at worst. Though as anyone who knows an iPhone user, having a ready set of apps readily available and billable to your mobile plan can’t be hurting Apple. So Google has got two things right: an open platform with available hardware and a way for developers to make money of the device.

READ  Learning Android

What does the book teach?

After the first introduction to Android, the book takes you through installing the Eclipse-based IDE and creating the obligatory Hello World application. From then on, it’s into creating a simple Sudoku game while learning to develop user interfaces that will adapt to different layouts. One thing readers will notice is there are a lot of XL files to edit, which shows a bit how new Android is. It brought back memories of hand-editing AmigaDE packager files for the ill-fated AmigaDE/Intent system. AmigaDE tackled a lot of the problems inherent in writing applications where the screen orientation and size might vary greatly about eight years ago.

Besides the Sudoku game, there is a chapter on significant features of Android, including the database (SQLite), 3D graphics, using the WebKit-based browser and the location/orientation APIs. While there are many tutorials on individual features, coders looking for advice on how to create games for Android are left at Sudoku, though retro arcade games are undoubtedly possible.

The book’s layout is sparse, with plenty of black and white screen-shots of the application running in the emulator as well as code listings. Listings have a path above then so they can be found in the download-able source code. There are also several break-out boxes with hints and tips about things to watch out for or alternate ways of doing things.

I think that one of the factors that made the early personal computers special was their accessibility with a bit of know-how you could figure out how to make your computer do things pretty quickly. “Poke” a number from 0-15 in this memory address and the screen’s border changes colour. Poke a number into this spot and some unearthly pulsing noise comes out of the TV- 15-year-old boys love that kind of stuff. A few years on HTML and Javascript came along, and well that eventually led to MySpace pages with 15 gyrating videos causing unearthly pulsing noises to come out of your laptop. Android has this same potential to be an accessible platform more than a lot of other options. Compared to an iPhone, you don’t need to purchase a Mac or learn Objective C. Java has become the lingua franca of mobile devices, so building a system on it makes sense. The developer kit is a free download and, probably just as importantly, there is a growing installed base of phones. Finally, Google is taking steps to make selling your applications more accessible. The book does a pretty good job teaching readers how to write Android applications, and the tips are useful.

READ  Developing With Google App Engine