Java to cpp more than one variable

I was able to pass data from ofActivity to ofApp.cpp i will post the code below,
But i’m not able to pass more the than to variables how can achieve that? i think the trick is on OFActivty


OFAndroid of = new OFAndroid("jala");


private static String text ;

public OFAndroid(String text) {
	this.text = text ;

public void useText() {
	Log.e("TAG" , this.text);

String variableToStoreStringInClass;

public void setString(String yourString){

	variableToStoreStringInClass = text;

static public String getStringToCppSide() {

	return text;


std::string ofApp::getJavaString() {
	jmethodID midCallBackStatic = ofGetJNIEnv()->GetStaticMethodID(ofGetJavaOFAndroid(), "getStringToCppSide", "()Ljava/lang/String;");
	jstring resultJNIStr = (jstring)ofGetJNIEnv()->CallStaticObjectMethod(ofGetJavaOFAndroid(), midCallBackStatic);
	const char *resultCStr = ofGetJNIEnv()->GetStringUTFChars(resultJNIStr, NULL);
	std::string resultStr(resultCStr);
	ofGetJNIEnv()->ReleaseStringUTFChars(resultJNIStr, resultCStr);
	return resultStr;