Handle click event in C++ file from Activity

I have a code like this in C++ file:

if (titleString1.find(str1) != std::string::npos) {
					titleS = "$5,000 (multiplayer)";
					descriptionCoinMiddle = CCSprite::createWithSpriteFrameName("pak1.png");
				}

Now in my Activity class I want to handle this event, if click do something in java file. So how can I do?

You want to call your Java class from the native code? Have a look at http://stnguyen.com/cocos2d-x/call-java-functions-from-cpp.html

1 Like

@nikcain I want to call the native code from Java class :smile:

With EasyNKD, I do not need any SDK plug-in (even the SDKBOX) for call java/Object_C from C++ and call C++ from java /Object_C

1 Like

ok :slight_smile: that article covers that in part 2! http://stnguyen.com/cocos2d-x/call-cpp-functions-from-java.html

1 Like