and pass correct values for the string and int, the program crashes. I believe this is because the C++ code is calling back to the Java code on the wrong thread. So when this line:
return setIntegerForKeyJNI(pKey, value);
is called, the app will stop running.
Is there a way to modify the CCUserDefaultAndroid.cpp file so that it calls setIntegerForKeyJNI(pKey, value); on the other thread, and not on the cocos thread.