Creating a native activity with Android NDK

In the following section, we are going to study how an application can be done entirely using native C code, without any Java code being required at all. Please note that this is done more for study purposes, as there are not many practical cases where developing a purely native application will be useful. However, it will serve as a good example of interaction between the different layers and the Android operational system.

Since we are not using Java code, we need to specify in the AndroidManifest.xml file that our project will contain no Java code. This is done using the following lines:

<application android:label="@string/app_name"
android:hasCode="false">

Applications using only native code are first ...

Get Android High Performance Programming 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.