18. Using the Android NDK

Although Android applications are primarily written in Java, there are times when developers need or prefer to leverage native C or C++ libraries. The Android Native Development Kit (NDK) provides the tools necessary to include and use native libraries within your Android applications. In this chapter, you learn under what circumstances the Android NDK should be considered, as well as how to configure and use it.

Determining When to Use the Android NDK

Most Android applications are written solely in Java using the Android SDK and run within the Dalvik VM. Most applications run smoothly and efficiently in this fashion. However, there are situations when calling into native code from Java can be preferable. The Android ...

Get Android Wireless Application Development, 2/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.