How to Keep JavaScript Running for Hidden Apps in Multi-Apps

Content:
I’m developing a multi-application system for Samsung Smart Hospitality Display where apps need to cooperate. A critical issue arises when App A (managing WebSocket connection & heartbeat) is hidden in the background — its JavaScript execution stops, causing heartbeat failure and data broadcast disruption to App B.
Scenario Details:

  • App A: Maintains WebSocket connection with server, sends heartbeat packets.
  • App B: Relies on App A’s WebSocket data for UI updates.
  • Problem: After switching from App A to App B, App A’s JavaScript halts, leading to connection timeout.

Goal:
Sustain WebSocket connection when App A is hidden, or find alternative data sync methods.

Possible Solutions?

  • Does Samsung support background services (e.g., Service Workers) for persistent JS execution?
  • Are there permission settings to allow hidden apps to run tasks?

Any insights would be greatly appreciated. Thank you!

I figured it out.
I solved it by config config.xml <tizen:setting background-support=“enable”>

1 Like

Hello,

For future reference, if you have any queries regarding Smart Hospitality Display, please contact using the following support channel: https://partnerhub.samsung.com