WebsiteBeaver / CordovaCall

Cordova CallKit & ConnectionService plugin for iOS/Android that displays the native call UI for VOIP apps
MIT License
196 stars 91 forks source link

Update receiveCall example in README.md #48

Closed samastur closed 6 years ago

samastur commented 6 years ago

According to #34 you should not expect to get in-call UI on iOS after accepting a call.

D-Marc1 commented 6 years ago

Thank you for the pull request, but I think you misconstrued #34. You'll still see the CallKit dialogue even in the app. The point is that your app should have its own UI as well. Imagine a video chat for instance. Your users will likely want buttons for end call, mute, flip camera, etc.

samastur commented 6 years ago

I am sorry, but it seems I don't understand what is supposed to happen or it does not work the same way for me.

I have a prototype app for testing CordovaCall and when I call receiveCall function, it opens CallKit's interface for accepting/declining call. Once accepted, this interface disappears, it shows in-call UI for a split second, then that one disappears too and I end up in the app that was below CallKit. Call itself is still ongoing, but I never see in-call UI. If I switch outside of the app, I'll get a green bar on top for the call in progress and clicking on it switches back to my app's interface. This is both on iOS10 and iOS11. On Android (7) however accepting a call switches to the in-call UI.

I got an impression from documentation that in both cases I should end up in in-call UI which is why I yesterday spent hours trying to find error in my code. It seems to me that either my expectation was correct and something is not working correctly for me, or documentation is somewhat misleading.

D-Marc1 commented 6 years ago

Right, what you're saying is correct. CallKit and ConnectionService are both simply used for the call dialogue to answer or reject. Once the call is accepted, it'll take you to your app, where a custom UI should be used. This is how all apps that utilize CallKit do it. Try doing a video chat on Facebook Messenger, Google Hangouts, WhatsApp, Skype, etc.