C++ back button handler conflicts with Activity onBackPressed

HI,

I have handled android back button in c++ code to pop the scenes.

I am using SDKBOX for integrating chartboost, review and flurry. Now, when I run the app, and the chartboost ad is shown, pressing the back button, removed the ad as expected. But on entering any screen, when I press back button the application crashes.

Is it possible to use back button handler in both the cocos2dxactivity ( which sdkbox does ) and inside the c++ classes.

Let me ask @nite to take a look at your question.

Yes, they should work, SDKBOX shouldn’t have any conflicts with your own onBackPressed handler, since they’re two different functions.

Can you post your crash log so I can see what’s actually crashing?

Sorry guys, I had a bad code.

Thanks @nite and @slackmoehrle

Things are working fine now. Will open a new thread if I face an issue.