Developers of the Google-backed Android mobile application platform have released revision 3 of Android NDK (Native Development Kit), which complements Android SDK by enabling developers to build performance-critical portions of an application in native code.
Release of NDK r3 was noted in a posting on the Android Developer Blog.
Version 3 includes OpenGL ES (Open Graphics Library for Embedded Systems) 2.0 native library support. Also featured is a sample application making use of OpenGL ES 2.0 vertex and fragment shaders.
"[OpenGL ES 2.0] brings the ability to control graphics rendering through vertex and fragment shader programs using the GLSL shading language," said David Turner, a member of the Google technical staff, in the Android Developer Blog.
Native libraries in Android NDK can be used on devices running the Android 1.5 platform or later, because toolchain and ABI-related changes made native libraries incompatible with 1.0 and 1.1 system images.
"Android applications run in the Dalvik virtual machine. The NDK allows you to implement parts of your applications using native-code languages such as C and C++. This can provide benefits to certain classes of applications, in the form of reuse of existing code and in some cases increased speed," according to an Android web page.
With version 3, toolchain libraries has been refreshed with GCC (GNU Compiler Collection) 4.4.0, to generate more compact and efficient machine code, Google said.
Compiler support is featured for ARMv5TE machine instructions. System headers are featured for stable native APIs, documentation and sample applications.
"The NDK will not benefit most applications," according to the Android developer page. " As a developer, you will need to balance its benefits against its drawbacks. Notably, using native code does not result in an automatic performance increase but does always increase application complexity. Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on. Simply recoding a method to run in C usually does not result in a large performance increase. The NDK can, however, can be an effective way to reuse a large corpus of existing C/C++ code."
Downloadable from the Android web page, the NDK features compilers, linkers and other technologies to generate native ARM libraries on Linux, Mac OS X and Windows platforms.