Android Java Calls

Do you take a copy of the JavaVM* that I can get at in native code?

Hopefully during init you cache that off, then in native code I can create an environment and make Java calls a la JNIExample.nw

Sadly this seems the only way to get at the camera preview :-/

Many Thanks

Dan

Hmm, thought inserting a JNI_OnLoad in my module might catch it, but it doesn’t work. Probably because my module isn’t loaded by java System.LoadLibrary.

The question is, can I inject that code into the unity.so, catch the JNI_OnLoad, then store off the JavaVM* and expose a function to retrieve it from my module.

one thing thats known to work to talk to Java is using the .net javavm
that seems to work

Cool, thanks, I’ll give that a try.

My other idea was to add code to the classes.jar in the android player.

As of beta7 the native .so libs should be added to the Java VM and thus have the JNI_OnLoad being called. If not please file a bug with a repro project, thanks.