How to use the react-native-callkeep.displayIncomingCall function in react-native-callkeep

To help you get started, we’ve selected a few react-native-callkeep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cern-phone-apps / desktop-phone-app / mobile / src / calls / providers / PhoneProvider / PhoneProvider.js View on Github external
handleInviteReceivedEvent = event => {
    const {
      setIsReceivingCall,
      call: { onCall },
      addAdditionalCall
    } = this.props;
    logMessage(`handleInviteReceivedEvent with onCall: ${onCall}`);
    logMessage(onCall);
    if (onCall) {
      addAdditionalCall();
    }
    // Retrieve the remote user information from the event data
    const { uri } = event.data.session.remoteIdentity;
    const phoneNumber = uri.user;
    setIsReceivingCall(phoneNumber, null, this.getCurrentCallId());
    RNCallKeep.displayIncomingCall(this.getCurrentCallId(), phoneNumber);
  };
github react-native-webrtc / react-native-callkeep / example / App.js View on Github external
const displayIncomingCall = (number) => {
    const callUUID = getNewUuid();
    addCall(callUUID, number);

    log(`[displayIncomingCall] ${format(callUUID)}, number: ${number}`);

    RNCallKeep.displayIncomingCall(callUUID, number, number, 'number', false);
  };
github voximplant / react-native-demo / src / manager / CallKitManager.js View on Github external
showIncomingCall(isVideoCall, displayName, callId) {
        this.callKitUuid = uuid.v4();
        this.withVideo = isVideoCall;
        this.callId = callId;
        RNCallKeep.displayIncomingCall(this.callKitUuid, displayName, displayName, 'generic', isVideoCall);
    }
github LFSCamargo / Chatify / packages / app / src / screens / Chat / ChatsList.tsx View on Github external
updateQuery: async (_, { subscriptionData }) => {
          const { callID, type, fromUser, chat, message } = subscriptionData.data.webRTCMessage
          const Busy = await RNCallKit.checkIfBusy()
          if (Busy) {
            await refuseCall(callID, chat._id, CALL_TYPES.BUSY)
          }

          if (type === 'offer') {
            RNCallKit.displayIncomingCall(callID, fromUser, '', 'generic', true)
            RNCallKit.addEventListener('endCall', () =>
              refuseCall(callID, chat._id, CALL_TYPES.REJECT),
            )
            RNCallKit.addEventListener('answerCall', () =>
              answerCall(callID, chat._id, fromUser, message),
            )
          }
        },
      })