I am porting an existing game from ios to android using cocos2dx. When the app is paused, eg by clicking the “lock” button on the device, the App is pausing/sleeping just as it should. But when the device is re-activated, and my app shows up again, it freezes for a couple of seconds. What I would like to do, is to show an ingame modal message telling the user that he/she should wait a sec until the game returns from freeze mode. But I simply can make this work.
I have tried to show the message, on “onPause” and on “onResume” but the message is not shown until the freeze mode is over, and I would like it to be shown the moment the app reappears.
How can I make this work?
on Ios it is possible to be notified before the app goes to the background… “applicationWillResignActive” and I cannot find anything like this on android. Does any notification/delegate function like “pre-onPause” exist on Android?
Any idees are appreciated.