Understanding a native code and the NDK
Android uses the Dalvik virtual machine to run apps. It
interacts with device-agnostic, cross platform commands into instructions. An
application code is written in Java or other language that is translated into
Java. Machine specific details are not handled by the code; instead, the Dalvik
virtual machine manages various details such as the processor, graphics,
memory, etc.
In most of the cases, the speed and memory overhead is a
valuable exchange. In some cases, developers need greatest performance. In both
conditions, the Native Development Kit lets developers embed C and C++
components in the app. It allows developers bringing most performance-intensive
pieces close to the hardware. But, using this technology makes the entire
process a little complicated.
When should Android developers use native code?
Using a particular technology, such as programming language
and tools for Android application development mostly depends on the skills of
developers. But developer's familiarity with C or C++ cannot be merely a reason
to use the NDK. Unless, development team is proficient to handle this
technology, they should not use it.
Many times, using native code technology can be beneficial.
This method is useful in processing data or computing physics and graphics for
games. Other good reasons include access to existing native libraries and
high-level code.
No comments:
Post a Comment