Game pasues, when change tabs or minimize browser or minimize mobile app

When I change tabs or minimize browser or minimize app, game will pause.
When game tab or app comes to four ground, all animation are done by fast.

I committed this line in CCBoot.js

    var onHidden = function () {
        /*if (cc.eventManager && cc.game._eventHide)
            cc.eventManager.dispatchEvent(cc.game._eventHide);*/
    };
    var onShow = function () {
        /*if (cc.eventManager && cc.game._eventShow)
            cc.eventManager.dispatchEvent(cc.game._eventShow);*/
    };

After this change also it’s happening.

what I observed on this issue is actions are stopped, when game in the background (in 2d-x).
This is issue is occurring on cocos creator also.

This game is a multiplayer game.
How to handle game pause when in background any alternative ideas more helpful.

In advance thanks!
@slackmoehrle @zzf_Cocos

What version of Cocos Creator is it happening in?

Cocos Creator editor 3.3.2

I can ask engineering to have a look.

In v3.3.2 on the Android platform into the background the game logic will stop, the problem we will be fixed in v3.4.1 version.

It seems like this issue is for web-mobile build too running on webview in Android.
I am using cocos creator 3.3.2 and facing same issues!
Is there any possible solution available?

Thanks in advance!
@linrm

Which platform are you giving feedback on? Is it a problem with the android webview?

We suggest you try the 3.4.1 bate version, and if you still have problems, you can give us feedback at

yes, the problem with the android webview & web-view too.

Thanks for suggestion @zzf_Cocos .
I will test in cocos creator 3.4.1 beta.

Please feedback us after your tested :slight_smile:

no changes in beta.
When game tab or app comes to four ground, all animation are done by fast.

we use this code to refresh game, when game come in to four ground.

game.on(Game.EVENT_SHOW, () => {})

Thanks. I’ll ask @zzf_Cocos to review.