Friday, 3 May 2019

React Native handle socket connection's events when app is in background?

I'm working on Chat app using React native and WebSocket everything works fine in active mode but when you push the home button to make the app in background mode, the WebSocket onMessage events function is not triggered

The good thing is that WebSocket connection is still connected but the events function not triggered.

I just want to push the notification when receiving a message in the background mode.

I did a research and I found that I need to run a silent background audio track at all times(some said this illegal way).

Is there a legal API to keep a connection alive in the background?

Do I need to re-connect the socket connection in the background mode



from React Native handle socket connection's events when app is in background?

1 comment:

  1. https://www.wizweb.in

    Wizweb Technology is a leading software development company custom website design, software development, SMS Provider, Bulk sms, transactional sms, promotional sms, mobile app development, Hosting Solution, seo(search engine optimization) and Digital marketing etc.

    ReplyDelete