Hi everyone,
I am developing a VoIP calling feature in my Flutter app, using:
Agora RTC Engine for real-time calls. CallKit & PushKit (VoIP notifications) for iOS call handling. Firebase Cloud Messaging (FCM) for notifications.
Problem: CallKit UI Stays on Screen When Caller Hangs Up (Background/Terminated)
I am using Firebase notifications to notify the receiver that the call should be dismissed, but it doesn’t work in the following cases:
App is in the background – CallKit UI remains stuck even after receiving the Firebase notification. App is terminated – The Firebase notification does not trigger any background execution, so CallKit UI stays forever.
Current Implementation I send an FCM notification to inform the receiver to dismiss CallKit UI. When received in the foreground, it works fine (callEnded method is triggered). But in background or terminated state, the notification is not received or doesn’t execute the code.