Issue
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 !
Solution
It is not possible in a simple way. Maybe by decomposition.
Answered By - KotlinIsland
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.