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

Add Ionic Support #34

Closed Barlocker-Garrett closed 6 years ago

Barlocker-Garrett commented 6 years ago

Adding [self.webView setBackgroundColor:[UIColor clearColor]]; to receiveCall works, but not for the others.

D-Marc1 commented 6 years ago

Sorry, I'm not really sure what you're asking. What does Ionic Framework have anything to do with this plugin?

mhartington commented 6 years ago

Hi there, Ionic dev here.

Ionic doesn't do anything differently than any other UI kit (Framework7, Onsen, etc). Though in my test, while the plugin calls are successful, the native UI is hidden behind the web view.

D-Marc1 commented 6 years ago

Hey @mhartington, thanks for letting us know. I wonder if it's because of the WKWebview plugin or if there's something within the framework itself affecting it. We'd be happy to investigate this and get it fixed.

mhartington commented 6 years ago

Hm, I never considered the WKWebview plugin 🤔 I'll see if I cant take a look and try to send along a PR

dmarcs commented 6 years ago

I might be misunderstanding the problem, but it seems to be working as expected. In order to test this out, I created an ionic project and called receiveCall as shown below. This is exactly what happens with Cordova. The incoming call screen displays, and once you accept the call the native call UI goes behind your app. That's also what happens if you use CallKit natively. It's just how CallKit works. There might be a hacky way to bring the call UI back to the front, but I wouldn't recommend doing that. The best thing to do is to create your own buttons (hangup, mute, reverse camera) in your app. You can add an onClick event for your hangup button that calls this plugin's endCall function for example.

ionic-callkit