androidiosmobilecocos2d-xmarmalade

Cocos Application did go into background callback not working


I am developing a game using Marmalade 7.10 and Cocos2d-X 2.2.6 and I am having a problem with the applicationDidEnterBackground and the applicationWillEnterForeground methods in the AppDelegate class.

I've done some tests in the simulator and in actual devices with both Android and iOS and these methods are never called when I press the home button.

Could you help me? Have I missed some configuration?


Solution

  • That feature is unimplemented, you can implement it yourself registering 2 callbacks with s3eDeviceRegister() in main() for S3E_DEVICE_PAUSE / S3E_DEVICE_UNPAUSE, then calling respectively:

    CCApplication::sharedApplication()->applicationDidEnterBackground() ;
    CCApplication::sharedApplication()->applicationWillEnterForeground() ;
    

    from the callbacks.