Closed kasuboski closed 7 years ago
After changing the argument of the callback methods to a String it seems to work. I'm guessing there just isn't support for Object...?
It doesn't really know what to do with Object. If you want a generic type, use JSValue.
On Monday, September 26, 2016, Josh Kasuboski notifications@github.com wrote:
After changing the argument of the callback methods to a String it seems to work. I'm guessing there just isn't support for Object...?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ericwlange/AndroidJSCore/issues/42#issuecomment-249628744, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIuZNbaeuYH_iee0H1kLu3zSI-DV5sEks5qt_iqgaJpZM4KGtN3 .
I'm trying to pass a java object for the JS to use as a callback, but when called the app crashes with: Abort message: 'art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: JNI SetLongField called with pending exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object[] org.liquidplayer.webkit.javascriptcore.JSBaseArray.toArray(java.lang.Class)' on a null object reference'
Java call:
JS:
I have NetworkCallback extending JSObject and implementing an interface. It is declared as abstract. Is this possibly the issue?
If this isn't possible is there a preferred method to get values back to Java after an asynchronous event in Javascript?