react-native-callkeep
react-native-callkeep copied to clipboard
answerCall not work in IOS 16.4.1
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?
Facing same issue. Any solutions?
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