Invoking JNI functions in Android package name containing underscore

JNI spec quote on the _1 rule

The _1 rule scriptocalypse mentions is part of the JNI spec 8 Chapter 2: Design Overview - Resolving Native Method Names:

Escape Sequence     Denotes
_1                  the character “_” 

You should follow the underscore with the number 1. So if your package name contains ing_simmons then your JNI would be formed like so.

void Java_co_uk_ing_1simmons_aberdeensoundsites_Record_initEncoder

This is true also if you have underscores in any other part of the call, such as class name or method name in the Java file.