what practical purpose does Android NDK serve? -


i trying understand why want use ndk feature in android programming? c++ important learn android ?

the 3 (and perhaps fourth) main reasons are:

  • performance. critical inner loops marginal performance advantage of c/c++ on java, before in time compilation (jit) available in android compiler, may decisive factor.
  • to use existing c/c++ libraries. reasoning here pretty obvious.
  • to ndk allows java api can't manage. low level operations close hardware, particularly touch manufacturer-specific hardware, might possible through c/c++
  • as yojimbo suggested, obfuscation. it's more difficult reverse engineer compiled machine code java byte code, though should never count on security obscurity.

having said that, should sure need ndk before decide use it. testing , maintenance costs of ndk code higher equivalent java.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -