43. Custom
frontal library
native method (frontal lib.)
Pick the right arch
yourself!
44. Custom: why?
[1] Properly target ARMv7 without NEON CPUs
when getCpuFeatures() can’t be used at
runtime (e.g. 3rd party libs)
[2] Bypass a loadLibrary bug on ICS!
[1] e.g. «the NVidia Tegra 2 generation SoC has a dual-core ARM Cortex-A9 CPU (lacking ARM's
advanced SIMD extension—NEON)» - see http://en.wikipedia.org/wiki/Tegra
[2] see http://www.moodstocks.com/2012/03/20/ice-cream-sandwich-why-native-code-support-
sucks
46. C pointer = int field
e.g. persist a DB handle
and use it throughout
the JNI extensions
Don’t forget to destruct it (explicitly
or at finalize() time)