Sunday, 15 July 2012

Calling Android debug method from C++ -



Calling Android debug method from C++ -

i have spent ridiculous amount of time trying figure out , @ absolute loss.

i working juce library , have modified 1 of sample projects. goal have simple android app written in c++ , ported android. need function in c++ can phone call call function on android side homecoming heap size , other characteristics c++ code can manage memory there.

if has simple solution amazing. right current snag this:

char const buf[] = "from jni"; jstring jstr = env->newstringutf(buf); jclass clazz = env->findclass("android/os/debug");

but maintain getting error saying 'newstringutf' not _jnienv member... if right click on method , jump definition, see in jni.h file... suggestions? i'm working in xcode way...

is plain c, not c++? perhaps file has .c extension.

if it's plain c should be

jnienv* env; jni_createjavavm(&jvm, (void **)&env, &args); (*env)->newstringutf(env, buf);

android c++ android-ndk

No comments:

Post a Comment