Entering background on Android

I’ve got an app that I’m trying to get to behave nicely on Android. Right now if you hit the home button the app will send a fatal signal 11 and you’ll have to go back to the main menu. I’ve got this code for sleeping the app.

void AppDelegate::applicationDidEnterBackground()
{
CCDirector::sharedDirector()->pause();

CCDirector::sharedDirector()->stopAnimation();
}

void AppDelegate::applicationWillEnterForeground()
{
CCDirector::sharedDirector()->startAnimation();

CCDirector::sharedDirector()->resume();
}

I heard something about using applicationWillResignActive on iPhone, but it seems like there isn’t a callback for that on Android.

Anyone have any idea what’s going on?

Do you still get the fatal signal 11 crash if you comment out the start and stop animation lines?

Just tested… Yeah.

It doesn’t do it on iPhone.