- Home /
How does UnityEngine.AndroidJNISafe work? Is there some Reference?
In my error log I can see that an exception was caught in function UnityEngine.AndroidJNISafe.CheckException().
I was not able to find a reference on that class UnityEngine.AndroidJNISafe to discover how it works.
The closest reference I've found is on UnityEngine.AndroidJNI, but there is no hint on how CheckException() can work and how it handles the exception. My main concern is the stability of my app.
It links to my previous question, anyway, this is more general one.
Thanks for your help
Answer by Yury-Habets · Mar 25, 2015 at 06:33 AM
AndroidJNISafe is an internal wrapper class. CheckException checks whether an exception occurred during a JNI call, and clears it if necessary (this ensures next JNI call does not cause a crash). I think it should be propagated as an AndroidJavaException to the script.
It should not affect the stability of an app, however you should realize that the call failed for some reason :) It affects your app in the same way any other exception would affect.
Hope this helps.
Thank you, it helped. Indeed it is throwing AndroidJavaException. Well, I'm catching it and so far no complainment made by users about unstability...
Your answer

Follow this Question
Related Questions
JNI Exception using Android Plugin 1 Answer
How to call an android notification plugin if it's not the main activity? 1 Answer
[Android] Call .jar function on render thread using JNI 0 Answers
Is it possible to cast AndroidJavaObject to its java subclass in C#? 1 Answer
Unity Android Flurry error 1 Answer