Chapter 9. Porting Existing Libraries to Android

There are two main reasons why one would be interested in the Android NDK: first, for performance, and, second, for portability. In the previous chapters, we saw how to access the main native Android APIs from native code for efficiency purposes. In this chapter, we will bring the whole C/C++ ecosystem to Android, well, at least discovering the path, as decades of C/C++ development would be difficult to fit the limited memory of mobile devices anyway! Indeed, C and C++ are still some of the most widely used programming languages nowadays.

In previous NDK releases, portability was limited due to the partial support of C++, especially Exceptions and Run-Time Type Information (RTTI, a basic C++ ...

Get Android NDK Beginner's Guide - 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.