Game Development Reference
In-Depth Information
Figure 2-2. New Android Application dialog box for this chapter's example
Now that you have your project skeleton, let's look at how this application is architected.
You'll start with a basic layout (architecture) of the components of the app including the Java
main activity, a native interface (also written in Java), and the C implementation. Next, you'll
see how to compile the native code, and finally you'll test on the emulator. Let's get started.
Application Architecture
Let's consider what you want to accomplish with this application: you want to create the
basic Android application. When run in the emulator, the app will create a default view with
the title “Hello Chapter2! My first Android NDK/JNI Project.” Within the project, you will
create a native folder with files to accomplish these tasks:
Create a native library with a main subroutine that will be called from the
Android main activity using JNI.
The main library subroutine invokes a Java method (using JNI) within the
Android project, sending a text message back to the Android Java layer.
 
Search WWH ::




Custom Search