Add overlooked JNI method to RegisterNatives.

This commit is contained in:
Dan Albert
2025-09-22 15:47:42 -07:00
committed by Dan Albert
parent 1ee099f9f7
commit 77557fb73e

View File

@@ -49,9 +49,7 @@ TickContext g_ctx;
*
* hello-jniCallback/app/src/main/java/com/example/hellojnicallback/MainActivity.java
*/
extern "C" JNIEXPORT jstring JNICALL
Java_com_example_hellojnicallback_MainActivity_stringFromJNI(JNIEnv* env,
jobject) {
jstring StringFromJni(JNIEnv* env, jobject) {
#if defined(__arm__)
#if defined(__ARM_ARCH_7A__)
#if defined(__ARM_NEON__)
@@ -288,6 +286,8 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
if (c == nullptr) return JNI_ERR;
static const JNINativeMethod methods[] = {
{"stringFromJNI", "()Ljava/lang/String;",
reinterpret_cast<void*>(StringFromJni)},
{"startTicks", "()V", reinterpret_cast<void*>(StartTicks)},
{"StopTicks", "()V", reinterpret_cast<void*>(StopTicks)},
};