I'm working on a Voip app and integrated CallKit. I know the CallKit UI will not show when there's incoming Voip calls, however the problem is when there's an ongoing Voip call and phone call at the same time (one on hold). You can test the below using Whatsapp.
- Start Voip call
- During the call, someone calls the phone using non internet sim/phone line
- CallKit UI shows up, with options to decline, end, or hold the voip call to answer the incoming phone call
- Select 'hold and answer', callkit UI shows two calls, with the voip call being hold
- Go back to the Voip app either by pressing the swap button and then the app icon (on the callkit UI itself), or by pressing going to home screen and click on app icon
- Voip app shows, there's a green bar on top that says 'Touch to return to call', I want to be able to go back to CallKit UI screen when user taps it (same as whatsapp).
If you test this on whatsapp you will know what I mean, I want to achieve the same behaviour.
I have implemented the top green bar following this post: How to show double height green statusbar (In-Call) in foreground app on device?
However I couldn't find a way to programmatically bring the CallKit UI back to the front, the answer in that post doesn't show how.
This post is similar but there's no answer because for that case there's no other calls on hold hence there's no requirement to bring CallKit to the front: CallKit - How to bring the CXCallController to the front