peerwaya / flutter_call_kit

Flutter iOS CallKit framework - Currently iOS >= 10.0 only
BSD 2-Clause "Simplified" License
55 stars 47 forks source link

Processing an incoming call on a locked screen. #14

Open kostasoft opened 4 years ago

kostasoft commented 4 years ago

Hello!

There is a problem with processing an incoming call on a locked screen. When the screen is unlocked - everything is super, the CallKit window appears about the incoming call with two buttons "Answer" and "Cancel". If you click Answer, the "performAnswerCallAction" event will trigger, I will process it, the CallKit screen will disappear, and my screen (my application) will remain, where I will continue to work with the current call. If your phone is locked - another CallKit screen with a slider appears and after a pile through the slider - it is replaced by another CallKit screen. But my application is not launched in the background and the only way to get to it is to press the custom button on the last CallKit screen, then the phone will request the lock code and only then will launch the main ViewController application.

The question is the following - how in the event handler "performAnswerCallAction" when the phone screen is locked to run the main application with Flutter in the background?

cielo commented 3 years ago

Are you using iOS VoIP notification to wake your application up?

https://developer.apple.com/documentation/pushkit/responding_to_voip_notifications_from_pushkit

VictorUvarov commented 3 years ago

CallKit will wake your app up to process the voip notification.

Here is a good explanation https://github.com/voximplant/flutter_callkit/issues/4#issuecomment-712142028