React Native Call not receiving in Background

166 Views Asked by At

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

1

There are 1 best solutions below

0
On

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.");
    }