Most Android applications run in the Dalvik virtual machine, but Google has released the tools developers need to create native apps.
The company warns that native apps have advantages and disadvantages. They will be more complicated, have reduced compatibility, have no access to framework APIs, and be harder to debug. On the other hand, some applications that have self-contained, CPU-intensive operations that don’t allocate much memory may still benefit from increased performance and the ability to reuse existing code. Some examples are signal processing, intensive physics simulations, and some kinds of data processing.
Android Native Development Kit is available now from the Android developer site. This allows developers to implement parts of their applications using native-code languages such as C and C++.
The NDK provides:
- a set of tools and build files used to generate native code libraries from C and C++ sources
- a way to embed the corresponding native libraries into application packages files (.apks) that can be deployed on Android devices
- a set of native system headers and libraries that will be supported in all future releases of the Android platform, starting from Android 1.5 documentation, samples and tutorials