Author: Zigurd Mednieks, Laird Dornin, G. Blake Meike & Masumi Nakamura
Aimed at: Proficient programmers who want to get up to speed on Android
Reviewer: Harry Fairhead
Programming Android has been updated to cover Android 4 for its second edition. Who is it aimed and what makes it special?
The key to knowing what this book sets out to do is in its subtitle, Java programming for the new generation of mobile devices, but even this doesn't tell the full story.
The book is divided into four parts and Part I is titled Tools and Basics. As you would expect it starts off with installing the tools you need to create an Android application. The instructions are angled towards Linux, but they are fairly vague and the comments on what you need should be enough for you to install everything. This is clearly not a step-by-step book. As well as the major tools such as the Eclipse add-in it also goes over what some of the small command line utilities are for, something most books miss.
Chapter 2 is, surprisingly, an introduction to Java. Most Android books start off expecting you to know Java and usually get to a Hello World example in Chapter 1 - not so here. You do get to load and run the supplied Hello World but the book doesn't use this as a starting point to explain how an Android app works.
The introduction to Java isn't low level enough for the complete beginner. It is, however, more or less enough Java for the C#, C++ or Objective C programmer to get up to speed on some of the Java idioms and practices. This is aimed at the experienced programmer and this is why we don't get much in the way of practical examples early on.
Chapter 3 goes over the ingredients of an Android app and this doesn't start with the UI - the easy part. It outlines the deeper structure - Activities, Intents and tasks, services, content providers, broadcast receiver and so on. It also goes into the Dalvik VM and the activity life cycle. This is another chapter aimed at the experienced programmer. If you are new to programming or mobile programming you probably will find this tough going but if you want to be brought up to speed on Android this is a quick way of doing it.
Chapter 4 is about issues of deployment - application signing, the Android market and using Google maps. This is probably out of place and could be later in the book. Chapter 5 explains how to use Eclipse - which you can skip if you already know how but if you have moved from another IDE it is very helpful.
At the end of Part I we certainly haven't had a practical introduction to Android but if you are an experienced programmer new to Java it will all have helped.
Part II is called About the Android Framework and it focus on some intermediate aspects of using Android. Chapter 6 is about using the View to build a GUI. This isn't the sort of introduction that lists all of the different components you could use. It is again a fairly high level look at the relationship between View and Controller and how to organize things. This approach continues in Chapter 7, where we look at fragments and working with different versions of Android. Chapter 8 goes over 2D and 3D graphics, including a quick introduction to OpenGL. The final chapter of this section is on handling persistent data and its is a fairly in depth look at SQLite.
Part III is called A Skeleton Application for Android.This sounds more hands-on but there is still a lot of theoretical discussion. Chapter 10 looks at what makes a well behaved application in terms of its lifecycle. The rest of the section is on content providers and presents the idea of a network MVC design. Chapter 11 on the UI is probably far too short - the Android UI has grown to be big and complicated. Chapter 12 deals with content providers and chapter 14 is about using content providers as a front for a REST API delivered by a server.
The final part of the book is simply called Advanced Topics. Surprisingly, this is much more like the standard introductory books on Android and goes over the usual topics - search, multimedia, location, sensors, communication and finally the NDK.
There are example applications presented later in the book but this isn't the reason to read it. If you are looking for a book that starts off with a simple example and works its way up to something more complicated then you are most likely going to hate this book. It is a book suitable for the reasonably capable programmers and most of the time it tells you things that will only make sense if you have written a program or two. It can be difficult to get the "bigger picture" from many of the descriptions. For example you have to read the early chapter on fragments and then read the example that makes use of them much later on to get any idea of what a fragment is all about. You get there in the end but you have to be prepared to keep reading.
It's a good book if you want to convert from another mobile platform or from another language to Android. Not so good if you are a complete beginner or if you are expecting lots of step-by-step instructions or a set of graduated examples. Don't buy this book if you not already proficient in programming in an object-oriented language, despite the fact that it has an introduction to Java.
As long as you fit into the category of ideal reader, then this is a very good book and recommended.