How to make my application run in background?

I found this for unity,
but I didn’t manage to find anything similar for playcanvas. Is there any (simple or just any) way to make my game made by playcanvas run in background?

thank you

Hey @goldy,

PlayCanvas is just a HTML5 Engine, which is ran in a WebView on mobiles(assuming we’re talking mobile here). I don’t know much about background activity, but from my limited knowledge, background activity can’t be tied to UI, and as far as I know, WebView is always using UI.

I suggest you try to look up on Google for PhoneGap or other HTML5 compilers for iOS/Android, maybe there are some plugins that could help.

Depends what you need to do. But it is generally not a good idea to do, as you will drain users battery quickly that way, without their concern, as loads of users not bother clearing taskbar on phones.

There are Service Workers, they allow some level of off-line js running, including triggered by notifications APIs, you need to check availability of those APIs across browsers first.

1 Like

Hi for my use I need to run the application in background , is there any way I can do that