how to make back key enabled in cocos2d-x in c++ for android while using xcode


#1

I am new to cocos2d-x.I am using xcode for cocos2d-x ios game and will port to android.I want to make keyback enabled and do some functionality on it.I have used virtual void keyBackEnabled() but its not working in android. How to code the keyback of android in xcode cocos2d-x in c++.Any idea?


#2

In the Layer::init():
this->setKeyBackEnable(true);