-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
I have the following code in app.js
useEffect(() => {
if (Platform.OS === 'ios') {
VoipPushNotification.addEventListener('register', token => {
store.dispatch(setApnsToken(token));
});
VoipPushNotification.addEventListener('notification', notification => {
Alert.alert('Call answer');
const incomingCallAnswer = () => {
store.dispatch(
setCall({
label: notification.aps.number,
number: notification.aps.number,
type: notification.aps.type,
uuid: notification.aps.uuid,
status: 'incoming',
}),
);
};
const endIncomingCall = () => {
Incomingvideocall.endAllCall();
};
Incomingvideocall.configure(incomingCallAnswer, endIncomingCall);
VoipPushNotification.onVoipNotificationCompleted(notification.uuid);
return;
});
VoipPushNotification.registerVoipToken(); // --- register token
}
}, []);
when push comes i get two calls Alert.alert('Call answer');
What could be the problem?
Metadata
Metadata
Assignees
Labels
No labels