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 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.