Hello!
I’m creating a bridge between C++ and Java. I want to use all the possible sensors in my cocos2dx game thats why I wrote a simple SQLiteDatabase in android + gather all the touches/sensors/etc. Now I want to combine the code from android with my cocos game.
I have something like this:
public class MainActivity extends Cocos2dxActivity
{
private static MainActivity mainActivityInstance = null;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
mainActivityInstance = this;
}
(...)
}
However when I start the game the “onCreate” method is not being called automatically. How and when should I call the onCreate method from my cocos2dx game? Or what should I do that the method is being triggered automatically?