Codebase list crossguid / 37839012-af48-42bf-a7e3-c24d5ce9f0ee/main android / jni / jnitest.cpp
37839012-af48-42bf-a7e3-c24d5ce9f0ee/main

Tree @37839012-af48-42bf-a7e3-c24d5ce9f0ee/main (Download .tar.gz)

jnitest.cpp @37839012-af48-42bf-a7e3-c24d5ce9f0ee/mainraw · history · blame

#include <string>
#include <sstream>
#include <jni.h>
#include <iostream>
#include "../../test.h"
#include "../../guid.h"

extern "C" 
{

  jstring Java_ca_graemehill_crossguid_testapp_MainActivity_test(JNIEnv *env, jobject thiz)
  {
    std::stringstream resultStream;
    test(GuidGenerator(env), resultStream);
    return env->NewStringUTF(resultStream.str().c_str());
  }

}