使用jni将返回带有模板的对象的Java代码转换为C ++

我需要使用jni将一些Java代码转换为c ++。

I can't figure out how to get a value from java template in jni. Java code that I need to turn into jni c++ is following:

encoderCapabilities.getQualityRange().getLower()

The problem is java returns template:

public Range<Integer> getQualityRange ()

I tried to use following c++ code, but it crash: GetMethodID and CallObjectMethodV with function name "getQualityRange" and arguments "()Landroid/util/Range;". It seems did not crash, but next call crash: "getLower", "()I"

您能否建议可以使用哪些代码?

评论