Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save osscontributor/73835f3f4b2548bab2e7693a0e0349f4 to your computer and use it in GitHub Desktop.
Save osscontributor/73835f3f4b2548bab2e7693a0e0349f4 to your computer and use it in GitHub Desktop.
public void subscribeToMqtt(Message message) {
executor.cppMethod();
}
public class TestExecutor {
static {
System.loadLibrary("native");
}
public native String cppMethod();
}
cpp:
JNIEXPORT jstring JNICALL methodNAME (JNIEnv* env, jobject thisObject) {
printf("START PI TEST! \n");
return env->NewStringUTF("Hello from C++ !!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment