O'Reilly logo

Android NDK Beginner's Guide - Second Edition by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating a basic native Activity

We are now going to see how to create a minimal native activity that runs an event loop.

  1. Create a new hybrid Java/C++ project, as shown in Chapter 2, Starting a Native Android Project.
    • Name it DroidBlaster.
    • Turn the project into a native project, as already seen in the previous chapter. Name the native module droidblaster.
    • Remove the native source and header files that have been created by ADT.
    • Remove the reference to the Java src directory in Project Properties | Java Build Path | Source. Then, remove the directory itself on disk.
    • Get rid of all layouts in the res/layout directory.
    • Get rid of jni/droidblaster.cpp if it has been created.
  2. In AndroidManifest.xml, use Theme.NoTitleBar.Fullscreen as the application ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required