REVIEW

Book Review: Android Essentials

September 29, 2008
Aaman Lamba

The Google Phone is based on the Android platform, which is a software stack for mobile devices including an operating system, middleware and relevant applications for the device. The Android platform is maintained by the Open Handset Alliance. This is Java-based and uses a custom virtual machine, Dalvik that is Linux-based. The Google Phone and Android are gaining attention primarily due to the ease of developers being able to program new applications and submit them for the platform. This is counterpoised with the 'closed' Apple model for the iPhone.

Android Essentials by Chris Haseman is a useful guide to the platform, designed for the 'dabbler, professional, hobbyist, or coding junkie.' A knowledge of Java and a familarity with mobile platforms is useful to leverage the book, although the technically minded can read through and skip the more detailed parts. The only technical tools needed are the Eclipse IDE (Jave EE version) and the Android SDK. Once these are installed, the Android Developer Plugin for Eclipse makes common tasks related to working with Android almost effortless.

The basic Android project in Eclipse is structured to provide space for multimedia assets, the Android SDK files, UI resources, and activity files. A manifest file, AndroidMainfest.xml, is used to maintain order between files, manage permissions, resources, and for parsing by the Android engine. The interesting section in the manifest is intent filters, which are used to define specific activities for the application. An acivity is similar to a Java ME midlet. Running the application is easy enough and launches the Android emulator from Eclipse if the plug-in is installed.

The Android platform allows a single application to support multiple activities, a key difference from other mobile platforms. The platform supports multi-threading to make for efficient use of resources. The book goes into sufficient detail on these aspects and provides working code samples for them. It is very easy to set up tasks such as transitioning from a splash screen to the main menu of an application, for example, and intent receivers enable the development of applications that are event-driven, such as initiating an activity when an SMS arrives.

The Android platform provides a good set of libraries. The Telephony library, for example, provides access to GSM and other common telephony entities. Services are used to execute processing actions behind the UI. Data management is handled through content resolvers. The book takes some prank applications as examples to lighten the tone, but the more practical applications are left unexplored.

The user interface is a combination of XML-based widgets and Java-style Canvas/Panel layout managers. These are the usual TextViews, Linear Layouts, and Relative Layouts. Widgets such as buttons and text fields are added by embedding them in the XML Layouts and actions are processed by using CodeBehind-style handlers. The same XML Layout can be set up using Java or even custom UI rendering using the Canvas object. This last approach is best suited for visually rich applications like games.

The book wraps up with a useful example of how to load and parse a list of Internet radio stations, and possibly play them, although, the author notes that 'Sadly, the state of Android's streaming audio does not live up to its documentation.'

The final chapter covers some useful tips on UI design and location management, and points the reader to more information on Android development, as well as a call to arms for Android developers.

Aaman Lamba is the Publisher of Desicritics.org, a Blogcritics network site. He also blogs, more infrequently nowadays, at Audit Trails Of Self
  View Aaman Lamba's profile on LinkedIn
eXTReMe Tracker
Keep reading for comments on this article and add some feedback of your own!

Comments! Feedback! Speak and be heard!

Comment on this article or leave feedback for the author

Add your comment

(Or ping: http://desicritics.org/tb/8273)

Personal attacks are not allowed. Please read our comment policy.






Remember Name/URL?

Please preview your comment!