Building Applications for the Android Market
A “distilled version of the Marakana Android Bootcamp.”
What sets this book apart from the growing number of Android books on the market today are an actual full-featured application to work on, coverage of the newest versions of Android and the Native Developer Kit.
The author describes the book itself as a “distilled version of the Marakana Android Bootcamp” that the author has taught for several years. As such, it covers all the aspects of getting up to speed with Android programming right from setting up an Eclipse-based development environment.
The book starts with a historical overview of Android’s origins, how the various parts of Android OS fit together (the stack), how to set-up a development environment with Eclipse, the main building blocks and an overview of the book’s project, Yamba.
Chapter four covers the building blocks of an Android application: application states (starting, running, paused, etc.), Intents (inter-application messages), Services (background tasks without a UI), Content Providers (for sharing information between sand-boxed applications), Broadcast receivers (broadly an observer pattern for Android events).
The application readers will be learning on is Yamba (Yet Another Micro-Blogging Application). Yamba interfaces with Twitter through a third-party library and makes use of a lot of Android’s functionality. It is introduced in chapter five and also serves as an overview of the following sections that build on the building-blocks summary in chapter four.
The nine chapters that follow cover all the usual areas of Android development from UI (both as an XML file and programmatic), to databases with SQLite, to services and creating content providers.
The Native Developer Kit (NDK) is covered in chapter 15. Most books on Android don’t include writing in the NDK because its recommended uses are limited. The NDK lets developers write C/C++ code that runs on the same virtual machine as regular Java applications and as such is useful if you want to include native C/C++ libraries or write time-critical functions. Communications are done between native code and Java code with JNI (Java Native Interface). As an example, the book shows how to write a Fibonacci sequence calculator in C and then how to use and package it with a regular Android Java application.