connectycube-flutter-call-kit
connectycube-flutter-call-kit copied to clipboard
Incoming call screen doesn't appear
package: connectycube_flutter_call_kit 2.0.6
The callee gets "call notification" (Cloud notification) even when app is in foreground (active) but not the "Incoming call screen". I haven't done any changes in example code.
I want this screen to appear when callee receives the call invitation (When in foreground):
I found this piece of code on call_manager.dart
in _initCalls()
function interesting:
if (callState == CallState.REJECTED) {
reject(_currentCall!.sessionId);
} else if (callState == CallState.ACCEPTED) {
acceptCall(_currentCall!.sessionId);
} else if (callState == CallState.UNKNOWN) {
// ConnectycubeFlutterCallKit.setCallState(sessionId: _currentCall.sessionId, callState: CallState.PENDING);
// _showIncomingCallScreen(_currentCall!);
if (Platform.isWindows || Platform.isMacOS || kIsWeb) {
_showIncomingCallScreen(_currentCall!);
}
}
here _showIncomingCallScreen
doesn't call for android platform
Is that why it is not appearing?
Also Call notification(Cloud/push) is working fine in all three states background, terminated, and foreground (I want to show the call screen here instead of notification)
Update: I tried terminating the app then locked my mobile (turn off). Now, If I initiate the call the incoming call screen is appearing. But not when the app is in the foreground.
You can see the Incoming call screen only in case when the device is locked, otherwise, the notification will be displayed. If you need to show the Incoming call screen anyway, you can fork the plugin and rewrite it according to your needs.
Do you have any references on how to do it?
Closing since I no longer need this feature.