voximplant / flutter_callkit

Flutter SDK for CallKit integration to Flutter applications on iOS
MIT License
53 stars 18 forks source link

Timeout after call: [[FlutterCallkitPlugin sharedInstance] reportNewIncomingCallWithUUUID] #9

Closed kostasoft closed 3 years ago

kostasoft commented 3 years ago

Hello! Everything is super, your plugin works perfectly with all the necessary methods in Flutter. But according to Apple specification reportNewIncomingCallWithUUUID should be called when VoIP push comes, which you have perfectly implemented.

But if the user doesn't accept the call and reject it, the call lasts forever.

Could you add an additional endCall method to your plugin (in the native part) that would end the call with a specific uuid and we would call it at a given timeout. It would be awesome if this method would run through all current calls (like in your hasCallWithUUID method) and end only unanswered calls.

--- RUS ---

Здравствуйте! Все супер, ваш плагин отлично отрабатывает все необходимые методы во Flutter. Но по спецификации Apple reportNewIncomingCallWithUUUID должен вызываться по приходу VoIP пуша, что вы замечательно и реализовали.

Но если пользователь не примет вызов и не отклонит его, то звонок длится вечно.

Вы не могли бы добавить в ваш плагин (в нативную часть) дополнительный метод endCall, который бы завершал вызов с определенным uuid, а мы бы вызывали его по заданному таймауту. Было бы просто супер, если бы этот метод пробегал бы по всем текущим вызовам (как в вашем методе hasCallWithUUID) и завершал бы только неотвеченные вызовы.

VladimirBrejcha commented 3 years ago

Hello @kostasoft , What is the reason that you need this functionality in the native code? The call reported by the "reportNewIncomingCallWithUUUID" meant to be handled on the Flutter side. After "reportNewIncomingCallWithUUUID" method call on the iOS side, "didDisplayIncomingCall" will be called on the Flutter side, there you could end your call. So, if the call should be ended, "reportCallEnded" of the "FCXProvider" must be called on the Flutter side

kostasoft commented 3 years ago

I have a suspicion that the reportNewIncomingCallWithUUUID call does not start the application if it is unloaded from memory and the phone is locked. And the application only starts when the call is answered. But maybe I'm wrong, I'll look into it now. In any case, thanks for such a quick and informative reply.

--- RUS ---

У меня есть подозрение, что вызов reportNewIncomingCallWithUUUID не запускает приложение, если оно выгружено из памяти и телефон заблокирован. И приложение запускается только при ответе на вызов. Но, может быть, я не прав, буду сейчас разбираться. В любом случае, спасибо за столь быстрый и информативный ответ.