Chapter 5, Android Native Application API, discusses Android native application APIs, including
managing native windows, accessing sensors, handling input events, managing assets, and
so on. We will see how to write a pure native app in this chapter.
Chapter 6, Android NDK Multithreading, depicts Android multithreading API. We will cover
creating and terminating native threads, various thread synchronization techniques
(mutex, conditional variables, semaphore, and reader/writer lock), thread scheduling,
and thread data management.
Chapter 7, Other Android NDK API, discusses a few more Android libraries, including
jnigraphics, the dynamic linker library, the zlib compression library, the OpenSL
ES library, and the OpenMAX AL library.
Chapter 8, Porting and Using Existing Libraries with Android NDK, describes various
techniques of porting and using existing C/C++ libraries with NDK. We will port the boost
library at the end of the chapter.
Chapter 9, Porting Existing Applications to Android with NDK, provides a step-by-step guide
for porting an existing application to Android with NDK. We use an open source image resizing
program as an example.
Bonus Chapter 1, Developing Multimedia Applications with NDK, demonstrates how to write
multimedia applications with the ffmpeg library. We will port the ffmpeg library and use the
library APIs to write a frame grabber application.
Bonus Chapter 2, Developing Games with NDK, discusses writing games with NDK. We will
port the Wolfenstein 3D game to show how to set up game display, add game control, and
enable audio effects for a game.
You can download the bonus chapters from http://www.packtpub.com/sites/default/
A computer with Windows, Ubuntu Linux, or MacOS installed is necessary (Linux or MacOS is
Android development. Therefore, it is recommended to have an Android device.
The book assumes a basic understanding of C and C++ programming languages. You should
also be familiar with Java and Android SDK.
Note that the sample code of this book is based on Android ndk r8 unless otherwise stated,
since it is the latest version of NDK at the time of writing. By the time the book is published,
there should be newer versions. The code should also run on any newer versions. Therefore
we can install NDK r8 or later.