How to call an a overridden super class method in Java through JNI?

后端 未结 2 628
北海茫月
北海茫月 2021-01-18 11:42

I\'m attempting to override an activity callback method with a native implementation (to hook Lua into an activity). However I\'ve hit a snag trying to call the superclass m

相关标签:
2条回答
  • 2021-01-18 12:25

    You can try CallNonVirtualVoidMethod(): see http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/functions.html#wp4581

    0 讨论(0)
  • 2021-01-18 12:47

    You could do this:

    protected void onCreate(Bundle bundle)
    {
        super.onCreate(bundle);
        onCreate0(bundle);
    }
    
    private native void onCreate0(Bundle bundle);
    
    0 讨论(0)
提交回复
热议问题