Reputation: 867
I'd like to read an unsigned long long from my Kotlin code. The value comes from C++ code through JNI.
Here is the C++ code :
unsigned long long getMaxValue() {
return -1;
}
Here is the JNI code :
extern "C"
JNIEXPORT jlong JNICALL
Java_com_tb_of_1ir_MainActivity_getMaxValue(JNIEnv *env, jobject thiz) {
static auto a = MyCppSingleton::get();
return a->getMaxValue();
}
And here is the Kotlin code :
Toast.makeText(this, "getMaxValue : \"${getMaxValue()}\"", Toast.LENGTH_LONG).show()
private external fun getMaxValue(): Long
I also tried with BigInteger but with no result...
Thanks !
Upvotes: 1
Views: 457