Android NDK

Android Native Development Kit (NDK) is a toolset that allows developers to reuse code written in C/C++ programming languages and incorporate it to their app through Java Native Interface (JNI). Since the app will run directly in the processor, instead of being interpreted by Dalvik Virtual Machine, it will gain some extra speed.

Besides, code written in C/C++ for Android can be easily ported and run in other platform such as iOS or Windows.  Useful if you develop a multi platform application.

NDK will also increase your app complexity, however, it will limit your app functionality. For this reason, you should know that it must be used only if it is essential to your app. First, look for Android framework APIs and check if they can provide you the functionality you need.

What is the difference?

Android Software Development Kit (SDK), on the other hand, uses Java programming language, and includes sample projects, development tools and Integrated Development Environment (IDE) Android Studio. It also provides all the common APIs used for Android apps.

It is important to mention that some Android Apps use NDK to achieve a specific functionality. That makes NDK and SDK somehow complementary in some cases. However, Android still recommends to only used NDK if you really need to.

With the help of online communities and forums, we elaborate a infographic that explain some of the main reasons to use one kit over the other:

 

Reasons to use NDK

  • Great for CPU intensive operations: mobile videogames, signal processing or physics simulations. Run computationally intensive applications.
  • Porting existing C/C++ code to Android.
  • Developing a multiplatform application (iOS, Windows).

Reasons to use SDK

  • Ensured device portability despite processor architecture
  • Rich set of libraries
  • Automatic memory management

Apps that use NDK:

  • Whatsapp, TuneIn Radio Pro, Skype, Instagram, Angry Birds

Refences:

  • http://stackoverflow.com/questions/20910010/why-do-so-many-android-apps-use-the-ndk
  • https//www.youtube.com/watch?v=YvCRlJToCAg&t=58s