stomp-js / stompjs

Javascript and Typescript Stomp client for Web browsers and node.js apps
Apache License 2.0
738 stars 80 forks source link

Pinging on demand #622

Closed RookieIndieDev closed 5 months ago

RookieIndieDev commented 5 months ago

On android with react native, when the app is in the background, the client goes out of scope, so the connection is closed. To counter this, you could use a foreground service. But it's not always ideal to use a foreground service, like when the device restarts, foreground service doesn't restart. The other option is to use a Headless JS task, where you could have the client stay in execution, where we could keep sending heartbeats for it to not go out scope. Anyway to do that?

RookieIndieDev commented 5 months ago

Closed because it's android limitation, not anything stompjs can do about it.