Slow app resume after minimize solution?

Hi, I just wondering if there’s a solution for apps that resume too slow.
Mine takes up to 10 seconds to resume.

I know that my app has large assets but is there a way to make it resume faster?
or is they a way to add like an hour glass or just display a text saying loading or something.

How can I display something to tell the player that it is loading/resuming?

I hope somebody can help me. Thanks.
And Im using cocos2d-x for this app.

anybody?

10 seconds :;qst ?? wow.
I hope you are pausing your game on interrupt like below,

CCNode::pauseSchedulerAndActions();
CCArray* childs = this~~>getChildren;
CCObject* child;
CCARRAY_FOREACH {
CCSprite *sprite = child;
sprite~~>pauseSchedulerAndActions();
}

=> what are you doing on applicationDidEnterBackground() & applicationWillEnterForeground()?

=> and for displaying loading bar you can schedule method
this~~>schedule);
this~~>unschedule(schedule_selector(GameClass::updateLoading));

Hi Patel,

Yeah, it takes up to 10 seconds to wait it to resume.
Not sure if that is because my game has huge assets :confused:

Right now, I’m using the default cocos2d-x project setup where it calls
CCDirector::sharedDirector()>pause; in applicationDidEnterBackground
and
CCDirector::sharedDirector
>resume; in applicationWillEnterForeground
Do I have to add that pauseSchedulerAndActions block of code when applicationDidEnterBackground?
or the default Cocos2d-x project settings should be all set?
I’m using this version of cocos2d-x > cocos2d-2.0-x-2.0.4 maybe this old version is not stable?
So, if there’s no other way to make it load faster,
where do I add that loading bar ?
this~~>schedule);
this~~>unschedule(schedule_selector(GameClass::updateLoading));
Do I call it in applicationWillEnterForeground? and when should I remove it (or unscheduled it)?

Hope you can help me.

Thanks,

Farhan

smit patel wrote:

10 seconds :;qst ?? wow.
I hope you are pausing your game on interrupt like below,
>
CCNode::pauseSchedulerAndActions();
CCArray* childs = this~~>getChildren;
CCObject* child;
CCARRAY_FOREACH {
CCSprite *sprite = child;
sprite~~>pauseSchedulerAndActions();
}
>
=> what are you doing on applicationDidEnterBackground() & applicationWillEnterForeground()?
>
=> and for displaying loading bar you can schedule method
this~~>schedule);
this~~>unschedule(schedule_selector(GameClass::updateLoading));