aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Android-Studio/Tango.BL/src/main/cpp/native-lib.cpp
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2017-11-05 14:53:46 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2017-11-05 14:53:46 +0200
commit4b4e1154f0f041bcfea4fa6b922c0c5c2274983c (patch)
treee5c895aedef095240adbfd63729939b3a2b491f5 /Software/Android-Studio/Tango.BL/src/main/cpp/native-lib.cpp
parent13d10370d7f10aec71d48c5914c76208111eeb05 (diff)
downloadTango-4b4e1154f0f041bcfea4fa6b922c0c5c2274983c.tar.gz
Tango-4b4e1154f0f041bcfea4fa6b922c0c5c2274983c.zip
Added new Android Studio project.
Implemented PMR script for android studio. Added C++ support. Implemented android PMR unit testing.
Diffstat (limited to 'Software/Android-Studio/Tango.BL/src/main/cpp/native-lib.cpp')
-rw-r--r--Software/Android-Studio/Tango.BL/src/main/cpp/native-lib.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/Software/Android-Studio/Tango.BL/src/main/cpp/native-lib.cpp b/Software/Android-Studio/Tango.BL/src/main/cpp/native-lib.cpp
new file mode 100644
index 000000000..c7317d615
--- /dev/null
+++ b/Software/Android-Studio/Tango.BL/src/main/cpp/native-lib.cpp
@@ -0,0 +1,18 @@
+#include <jni.h>
+#include <string>
+#include "OtherClass.h"
+
+extern "C"
+JNIEXPORT jstring
+
+JNICALL
+Java_com_twine_tango_bl_Example_getString(
+ JNIEnv *env,
+ jobject /* this */)
+{
+
+ OtherClass c;
+
+ std::string hello = "Hello from C++" + c.getString(" Some String");
+ return env->NewStringUTF(hello.c_str());
+}