View Post

registering jni methods when using proguard

When writing Java software, it’s sometimes needed to call some native code, and mostly this has been achieved by writing a JNI adapter, and relying on the magic of the java runtime to link the methods in the library to the abstract native java methods.

Here we show another way to do this, applicable mostly when using Java in an embedded device, but perhaps in other settings too, where the java code can be ProGuard’ed and all symbols removed from the C objects.