stomp-js / stompjs

Javascript and Typescript Stomp client for Web browsers and node.js apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pinging on demand

RookieIndieDev opened this issue · comments

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?

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