15. Android Native Development

This chapter shows two different strategies for integrating native C code into Android applications. One strategy is to use Java Native Interface (JNI) to write wrapper functions in C and then Java to access a library of C code. The other strategy is to make use of the native activity, which allows an application not to have any Java code at all.

Android Native Components

When a computationally intensive function is critical to an Android application, it might be worthwhile to move the intensive computation to native C or C++ for efficiency. The Android Native Development Kit (NDK) exists to help in the development of a native component. The NDK is a companion to the Android SDK and includes a bundle of libraries ...

Get The Android™ Developer’s Cookbook: Building Applications with the Android SDK, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.