summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/cpp/native-lib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'android-app/app/src/main/cpp/native-lib.cpp')
-rw-r--r--android-app/app/src/main/cpp/native-lib.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/android-app/app/src/main/cpp/native-lib.cpp b/android-app/app/src/main/cpp/native-lib.cpp
new file mode 100644
index 0000000..f606a41
--- /dev/null
+++ b/android-app/app/src/main/cpp/native-lib.cpp
@@ -0,0 +1,14 @@
+#include <jni.h>
+#include <string>
+#include <android/log.h>
+
+#define TAG "WindVisualizationNative"
+
+extern "C" JNIEXPORT jstring JNICALL
+Java_org_terst_nav_MainActivity_stringFromJNI(
+ JNIEnv* env,
+ jobject /* this */) {
+ std::string hello = "Hello from C++";
+ __android_log_print(ANDROID_LOG_INFO, TAG, "stringFromJNI called!");
+ return env->NewStringUTF(hello.c_str());
+}