http://www.spinellis.gr/pubs/Breview/2012-CR-Android3/html/review.html
This is an HTML rendering of a working paper draft that led to a publication. The publication should always be cited in preference to this draft using the following reference:

The document's metadata is available in BibTeX format.

Find the publication on Google Scholar

This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders. All persons copying this information are expected to adhere to the terms and constraints invoked by each author's copyright. In most cases, these works may not be reposted without the explicit permission of the copyright holder.

Diomidis Spinellis Publications


Copyright © 2012 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) 869-0481, or permissions@acm.org.

Book Review: Beginning Android 3

Diomidis Spinellis
Athens University of Economics and Business

Murphy M.
Beginning Android 3
Apress, Berkeley, CA, 2011.
612 pp.

Android is an operating system run by internet-connected mobile devices, like smart-phones and tablets. With half a billion Android devices in operation around the world, developing applications for them seems like a tempting proposition. The 500,000 Android applications available on Google’s “Play” distribution service and the corresponding billions of downloads prove the point.

The Android application environment consists of a Linux kernel, numerous libraries written in C, and the Dalvik virtual machine, which is used to run Java code. The Java infrastructure is the basis for Android’s application framework, available as an API, which is in turn used by Android’s built-in and third-party applications. Applications can be installed via a USB cable, or, more commonly, downloaded from a location on the web.

If you want to write an Android application by reading through the API reference, think again. With 3200 classes organized into 170 packages the API is not something you can easily master and keep in your head. The application development process is also far from trivial. A bare-bones application consists of 12 files stored in 13 directories. Apart from the Java source code these include a manifest, assorted property files, the Ant build instructions, the layout specification, string resources, and bitmaps for various resolutions. Having written an application you probably want to test it in an emulator, adjust it so that it plays well in diverse Android hardware and software variations, and upload it on an online store.

Mark Murphy’s hefty tome titled “Beginning Android 3” cuts away a lot of the complexity associated with building an Android application by guiding you step-by-step through most of the way. The book’s 49 chapters are organized into seven (somewhat uneven) parts covering the basics, interactivity, tablets, data storage, non-interactive functionality, miscellaneous services, alternative application environments, and future challenges. Although the chapter titles may read like a laundry list, they are logically organized around features you will need as you build gradually more sophisticated applications. Furthermore, each chapter starts with an introduction explaining how a particular topic fits an application’s requirements. As a result, one can easily read the book from cover to cover, perhaps only skimming the numerous example code listings, to quickly get an overall picture of Android development. Many images depicting how an application will appear serve to guide the reader toward the desired functionality.

The writing is clear and crispy. Imaginative section titles, like “String Theory” and “In the Land of Menus in Honey”, lighten the prose, which owing to the large amount of material covered could otherwise be tiresome. In a number of places Murphy ventures beyond the typical exposition of the official API, offering personal advice for particular problems, for instance detailing how to obtain styled formatted text (the Android API uses incompatible types for Java formats and styled text), how to work with diverse screen sizes, and how to handle the inevitable changes in the Android platform specifications.

The book’s contents cover a substantial breadth. Fittingly for a platform that is used throughout the planet, Murphy discusses internationalizing applications, handling diverse hardware platforms, and even writing applications that behave correctly with languages written right-to-left. Areas I would have liked to read more about would include the devices’ multimedia capabilities, namely rendering graphics, sound input and output, using the camera, interacting with the touch screen and the accelerometers, and so on. Note however, that “Beginning Android 3” stands in the middle between another Apress title titled “Android Apps for Absolute Beginners” and three more advanced titles titled “Practical Android Projects”, “Pro Android 3” and “Android Recipes”. As such it will serve well an experienced programmer who wants to quickly dive into the development of moderately sophisticated Android applications.