January 21, 2021
Hot Topics:

Is the Android NDK Right for Your App?, Page 2

  • By Lauren Darcey & Shane Conder
  • Send Email »
  • More Articles »

Required Android NDK Manifest Elements

Applications that leverage the NDK must declare the appropriate manifest elements, just like a regular Android app. If your app is using the OpenGL ES libraries, you should declare the appropriate android:minSdkVersion attribute associated with OpenGL ES 1.1 (API Level 4) or OpenGL ES 2.0 (API Level 5). If your application uses NDK APIs where similar APIs in Java would require permissions, they'll still require permissions. The same goes for feature specification in the manifest file. However, there are no explicit manifest settings for using the NDK. Users of an application that uses the NDK need not know that it's being used.

Where to Find Android NDK Documentation

Most of the documentation for the Android NDK package is not available online. Instead, it is found in the ndk directory under docs. That said, the main document file called documentation.html is located at the root of the ndk directory. This document covers a variety of different topics, from installing the NDK (you've done that) to details of the Android and Application make files, and which APIs are stable and available for each Android API level. For example, EGL and OpenSL are available in API Level 9 while OpenMAX AL and OpenSL ES are available in API Level 14.

We have only scratched the surface here on what you can do with the Android NDK. For more information, we strongly recommend that you check out the Android NDK documentation that is available on the Android Developers website and the documentation in the NDK download. There you will find the latest information about working with the NDK as well as sample applications you can peruse.


The Android NDK is a powerful feature of the Android platform that allows you to embed native C and C++ code components into your Android applications. The NDK can help developers leverage their existing native libraries in their Android applications, as well as allow developers to handle high-performance CPU-intensive operations in native code where performance may be an issue.

Whether or not to use the Android NDK as part of your application design is an architectural decision, as the NDK is not for every application or device but it can be extremely useful for some. Even if you aren't convinced the Android NDK is right for your current project, you should know enough about it to evaluate it on a project-by-project basis.

About the Authors

Shane Conder Shane Conder and Lauren Darcey--Contributing Editors, Mobile Development--have coauthored two books on Android development: an in-depth programming book entitled Android Wireless Application Development (ISBN-13: 978-0-321-62709-4) and Sams Teach Yourself Android Application Development in 24 Hours (ISBN-13: 978-0-321-67335-0). When not writing, they spend their time developing mobile software at their company and providing consulting services.

        Email        |        Blog        |        Twitter

Lauren Darcey

Originally published on https://www.developer.com.

Page 2 of 2

This article was originally published on January 30, 2012

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date