2

I am integrating CometChat library in React native application. The call feature is working fine when app is in open state, but when the app is in background state the call is not receiving. Please guide me how can I integrate Background Call Feature Thanks in advance

Version used: React Native Version 0.61.3 CometChat Version 2.1.4 CometChat Call Version 1.0.3

  • I guess You Should Use Background App Refresh . and SocketIO When receive data from server . some package can help u like SignalR. – Meisan Saba Dec 11 '20 at 09:10

1 Answers1

1

I would recommend to play with AppState.

if (
      appState.current.match(/active/) &&
      nextAppState === "background"
    ) {
      console.log("App has come to the background! Here apply code for comming calls.");
    }
Vladimír
  • 701
  • 1
  • 7
  • 24