react-native-callkeep icon indicating copy to clipboard operation
react-native-callkeep copied to clipboard

answerCall not work in IOS 16.4.1

Open w4ugit opened this issue 1 year ago • 2 comments

I have set the following settings

useEffect(() => {
    const options = {
      ios: {
        appName: 'App',
      },
      android: {
        alertTitle: 'Permissions required',
        alertDescription:
          'This application needs to access your phone accounts',
        cancelButton: 'Cancel',
        okButton: 'ok',
        imageName: 'phone_account_icon',
        additionalPermissions: [],
        // Required to get audio in background when using Android 11
        foregroundService: {
          channelId: 'com.app',
          channelName: 'Foreground service for App',
          notificationTitle: 'App is running on background',
          //notificationIcon: 'Path to the resource icon of the notification',
        },
      },
    };

    RNCallKeep.setup(options).then(accepted => {
      console.debug('[INIT SUCCESS ' + Platform.OS + ']');
    });
    RNCallKeep.addEventListener('didChangeAudioRoute', ({output}) => {});
    RNCallKeep.addEventListener('didLoadWithEvents', events => {
      console.log('[CallKeep ' + Platform.OS + ']', 'Events');
    });
  }, []);

Then I want to listen for events when the user accepts or rejects the call through the system window

RNCallKeep.addEventListener('answerCall', ({callUUID}) => {
      startCall();
    });
    RNCallKeep.addEventListener('endCall', ({callUUID}) => {
      endCall();
    });

But this event does not fire. It's the window I call when I get a push

RNCallKeep.displayIncomingCall(
      q.uuid,
      q.number,
      user === undefined ? q.number : user.label,
      'number',
      q.type === 'video',
      null,
    );

What could be the problem?

w4ugit avatar May 15 '23 14:05 w4ugit

Facing same issue. Any solutions?

mohdmunaf avatar Jul 07 '23 07:07 mohdmunaf

it's more of a bug in the code, at least that's how it was for me. this article helped me https://www.videosdk.live/blog/react-native-ios-video-calling-app-with-callkeep

w4ugit avatar Jul 07 '23 12:07 w4ugit