I've gotten JNI to work pretty easily by using the CName annotation and matching the CName of the method with the name Java expects. It would be nice if, when my code in in the same project, there was some annotation like JNI(KClass) that would recognize the name Java expects for a JNI method and set the String for me.
Landry Norris
02/13/2022, 2:23 PM
Especially since I prefer to use JNI in static classes so the names are always something like com_example_modulename_JniBridge_Companion0012 or something like that. It would be nice to just put an annotation like JNI(JniBridge::class)
i
ishitatsuyuki
02/13/2022, 2:25 PM
Is that for JVM-specific bindings? Ideally I want to share code between Native and JVM bindings
l
Landry Norris
02/13/2022, 2:26 PM
That is for when I have native and JVM code in the same project, and I want to be able to bind the native to Java calls via JNI.