aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Android-Studio/app/src/main/cpp/native-lib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Android-Studio/app/src/main/cpp/native-lib.cpp')
-rw-r--r--Software/Android-Studio/app/src/main/cpp/native-lib.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Software/Android-Studio/app/src/main/cpp/native-lib.cpp b/Software/Android-Studio/app/src/main/cpp/native-lib.cpp
new file mode 100644
index 000000000..fa595fbae
--- /dev/null
+++ b/Software/Android-Studio/app/src/main/cpp/native-lib.cpp
@@ -0,0 +1,13 @@
+#include <jni.h>
+#include <string>
+
+extern "C"
+JNIEXPORT jstring
+
+JNICALL
+Java_com_twine_tango_MainActivity_stringFromJNI(
+ JNIEnv *env,
+ jobject /* this */) {
+ std::string hello = "Hello from C++";
+ return env->NewStringUTF(hello.c_str());
+}