-
-
Save initishbhatt/5df9aa1f71d23fc6efb6c86a056e7618 to your computer and use it in GitHub Desktop.
native function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <jni.h> | |
#include <string> | |
extern "C" JNIEXPORT jstring | |
JNICALL | |
Java_com_initishbhatt_kotilnjnisample_NativeStore_stringFromJNI( | |
JNIEnv *env, | |
jobject /* this */) { | |
std::string hello = "Hello from C++"; | |
return env->NewStringUTF(hello.c_str()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment