Custom
frontal library
native method (frontal lib.)
Pick the right arch
yourself!
Slide 44
Slide 44 text
Custom: why?
[2] Bypass a loadLibrary bug on ICS!
[1] Properly target ARMv7 without NEON CPUs
when getCpuFeatures() can’t be used at
runtime (e.g. 3rd party libs)
[2] see http://www.moodstocks.com/2012/03/20/ice-cream-sandwich-why-native-code-support-
sucks
[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
Slide 45
Slide 45 text
- Quick JNI hints -
Slide 46
Slide 46 text
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)
Slide 47
Slide 47 text
C error codes
C error code
& string
Slide 48
Slide 48 text
Resources
#AltDevBlogADay NDK Part 1 & Part 2 Linux Mag., 07/11
VLC for Android
Tokyo Cabinet Java Pkg